Skip to content
Closed
Changes from 2 commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
7 changes: 7 additions & 0 deletions gittensor/cli/miner_commands/post.py
Original file line number Diff line number Diff line change
Expand Up @@ -219,6 +219,13 @@ def _validate_pat_locally(pat: str) -> str | None:
)
return None

gql_data = gql_resp.json()
if (gql_data.get('data') or {}).get('viewer') is None:
err_console.print(
'[red]PAT lacks GraphQL API access. Fine-grained PATs need "Public Repositories (read-only)" permission.[/red]'
)
return None

return login
except requests.RequestException:
return None
Loading