When I use SmartGit on windows to clone/sync one of my example repositories from bitbucket.org, I meet the HTTP authentication failed error. The detailed error message is The OAuth-access token could not be requested. Most likely your Bitbucket configuration has changed and SmartGit’s stored OAuth credentials are invalid. To resolve, recreate the Bitbucket hosting provider in the Preferences. This article will tell you how to fix it.
1. How To Fix The SmartGit Authentication Failed Error.
- Open SmartGit, click the Edit —> Preferences menu item to open the SmartGit Preferences dialog window.
- Click the Hosting Providers item on the preferences dialog left side.
- Click the Add… button on the window right side to open the Add Hosting Provider window.
- Select the Bitbucket item from the hosting drop-down list.
- Click the Generate Token button to generate the bitbucket token.
- It will open a web browser and show the generated token, and popup a dialog window with the title Request Access Token.
- Copy the token and paste it to the Code input text box on the Request Access Token pop-up dialog window.
- Click the OK button to close the dialog window Request Access Token.
- Click the Add button to add the token to the hosting provider list.
- If there is already existing one Bitbucket hosting provider in the list, then remove it first and add it again.
- Now when you clone or sync your bitbucket repository again, the SmartGit authentication error will disappear.
- The above steps can also be used to fix other SmartGit authentication errors such as SmartGit, unable to push, “remote: HTTP Basic: Access denied”.
- If you meet an error like remote: Bitbucket Cloud recently stopped supporting account passwords for Git authentication, you can also use this method to fix it. Below is the detailed error message.
Command: git -c diff.mnemonicprefix=false -c core.quotepath=false --no-optional-locks ls-remote https://[email protected]/zhaosong/excel-learner.git Output: Error: remote: Bitbucket Cloud recently stopped supporting account passwords for Git authentication. remote: See our community post for more details: https://atlassian.community/t5/x/x/ba-p/1948231 remote: App passwords are recommended for most use cases and can be created in your Personal settings: remote: https://bitbucket.org/account/settings/app-passwords/ fatal: Authentication failed for 'https://bitbucket.org/zhaosong/excel-learner.git/'