- 1 year ago
Sourcetree: Invalid password for Github despite having a valid OAUTH token on Windows
If you are experiencing issues with Sourcetree not accepting your OAUTH token for GitHub authentication, there are a few things you can try to resolve the problem:
Check the Token Scope: Ensure that the OAUTH token you generated has the necessary scopes for Sourcetree to access your repositories. It should have at least the "repo" scope for private repositories and "public_repo" scope for public repositories.
Verify Token Expiration: GitHub OAUTH tokens have an expiration date. Make sure that your token is still valid and hasn't expired. If it has, generate a new token.
Clear Sourcetree Credentials: In some cases, Sourcetree might be caching old credentials. To clear the cache, go to Tools > Options > Authentication and click on the "Clear" button next to the GitHub account.
Use Personal Access Token: Instead of using an OAUTH token, you can try using a Personal Access Token for authentication. Generate a new Personal Access Token from your GitHub account and use it as your password in Sourcetree.
Check Windows Credential Manager: Sourcetree stores credentials in the Windows Credential Manager. If there is a conflict or an old credential stored, it could cause authentication issues. Open the Windows Credential Manager, locate the GitHub credentials, and remove any outdated entries.
Update Sourcetree: Make sure you are using the latest version of Sourcetree. Older versions might have bugs or compatibility issues that are fixed in newer releases.
Reauthorize GitHub Account: If none of the above steps work, try removing and re-adding your GitHub account in Sourcetree. This will prompt you to reauthorize Sourcetree with your GitHub account and generate a new token.
If the issue persists, you may want to reach out to the Sourcetree support team or check the Atlassian Community forums for more specific troubleshooting steps.