GitHub - Re-authorize the OAuth
Posted on 2025-09-04
When working with GitHub repositories secured by SAML SSO or two-factor authentication, it is common to encounter access errors during the initial cloning.
This post guides you step by step through the installation and configuration of Git Credential Manager, an essential tool for restoring access to protected repositories and facilitating authentication via GitHub.
Authentication GitHub
If you are using a GitHub repository that has enabled or applied SAML authentication or two-factor authentication, you may receive this error when accessing it for the first time.
$❯ git clone https://github.com/my-organization/my-repo.git
Cloning into 'MyRepo'...
remote: The 'my-organization' organization has enabled or enforced SAML SSO.
remote: To access this repository, you must re-authorize the OAuth Application 'Git Credential Manager'.
fatal: unable to access 'https://github.com/my-organization/my-repo.git/': The requested URL returned error: 403
Install the Git Credential Manager
To fix this, you need to install and configure your GitHub account:
- Install Git Credential Manager:
dotnet tool install -g git-credential-manager
- Configure this tool:
git-credential-manager configure
- Log in via your browser:
git-credential-manager github login
You can now run your Clone command again.