Re-authorize the OAuth Application in GitHub CLI

Viewed 1699

I'm part of an organization, so I'm trying to clone a repo that is inside of that organization but every time that I've tried I get this error:

Cloning into 'diretory'...
remote: The `X' organization has enabled or enforced SAML SSO. To access
remote: this repository, you must re-authorize the OAuth Application `GitHub CLI`.
fatal: unable to access 'https://github.com/X/Y.git/': The requested URL returned error: 403

Have you ever had a similar problem?

1 Answers

What fixed it for me was to open the Credentials Manager of Windows and delete all GitHub-related entries. Then on my next interaction with GitHub, from Visual Studio in my case (should be similar for GitHub CLI), I got a prompt to sign in and after that, it all worked fine.

Related