2

This is the response header I get
I don't know what I'm doing wrong

enteContent-Type →application/json; charset=utf-8
Transfer-Encoding →chunked
Status →200 OK
X-RateLimit-Limit →5000
X-RateLimit-Remaining →4997
X-RateLimit-Reset →1551418998
Cache-Control →private, max-age=60, s-maxage=60
Vary →Accept, Authorization, Cookie, X-GitHub-OTP
ETag →W/"4565984787f6361e646a393a316ef814"
X-OAuth-Scopes →admin:business, admin:gpg_key, admin:org, admin:org_hook, admin:public_key, admin:repo_hook, delete_repo, gist, notifications, repo, user, write:discussion
X-Accepted-OAuth-Scopes →
r code here
Til
  • 5,150
  • 13
  • 26
  • 34

1 Answers1

1

Either your PAT is actually not used (because your credentials, with a regular password) might already be cached by a credential helper see git config credential.helper)

Or you are not using the right user when trying to access the repo (and that session, with a different account) would not find your regular Git settings.

Or you are not using the right URL (because it might be rewritten by a url.<base>.insteadOf config

The OP Manu Poduval confirm in the comments the URL issue, but it was actually an API URL, as described in this answer:

  • GETing /users/someusername/repos doesn't show private repos (even if it's the user whose oauth access token you're using).
  • GETing /user/repos show private repos
VonC
  • 1,262,500
  • 529
  • 4,410
  • 5,250
  • i was using the worng GET path GETting /user/repos?access_token = "xxxx" gets all the repos I didn't find this anywhere in the api docs but I found this on another answer https://stackoverflow.com/questions/21907278/github-api-using-repo-scope-but-still-cant-see-private-repos – Manu Poduval Mar 01 '19 at 06:48
  • @ManuPoduval Good catch. I have included that cause in the answer for more visibility. – VonC Mar 01 '19 at 07:39