GitHub - Re-authorize the OAuth
Posted on 2025-09-04
Lorsque vous travaillez avec des dépôts GitHub sécurisés par SAML SSO ou une authentification à deux facteurs, il est fréquent de rencontrer des erreurs d’accès lors du clonage initial. Ce billet vous guide pas à pas dans l’installation et la configuration de Git Credential Manager, un outil essentiel pour rétablir l’accès aux dépôts protégés et faciliter l’authentification via GitHub.
Authentication GitHub
Si vous utilisez un dépot GitHub qui a activé ou appliqué l’authentification SAML ou la double authentification, vous recevrez peut-être cette erreur lors du premier accès.
$❯ 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
Installer Git Credential Manager
Pour corriger cela, vous devez installer et configurer votre compte GitHub:
- Installer Git Credential Manager :
dotnet tool install -g git-credential-manager
- Configurer cet outil :
git-credential-manager configure
- Authentifier vous via votre navigateur :
git-credential-manager github login
Vous pouvez maintenant exécuter de nouveau votre commande de Clone.