Authentication Using OAuth Failed SmartGit Resolution

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.

  1. Open SmartGit, click the Edit —> Preferences menu item to open the SmartGit Preferences dialog window.
  2. Click the Hosting Providers item on the preferences dialog left side.
  3. Click the Add… button on the window right side to open the Add Hosting Provider window.
  4. Select the Bitbucket item from the hosting drop-down list.
  5. Click the Generate Token button to generate the bitbucket token.
  6. It will open a web browser and show the generated token, and popup a dialog window with the title Request Access Token.
  7. Copy the token and paste it to the Code input text box on the Request Access Token pop-up dialog window.
  8. Click the OK button to close the dialog window Request Access Token.
  9. Click the Add button to add the token to the hosting provider list.
  10. If there is already existing one Bitbucket hosting provider in the list, then remove it first and add it again.
  11. Now when you clone or sync your bitbucket repository again, the SmartGit authentication error will disappear.
  12. The above steps can also be used to fix other SmartGit authentication errors such as SmartGit, unable to push, “remote: HTTP Basic: Access denied”.
  13. 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/'

Leave a Comment

Your email address will not be published.

This site uses Akismet to reduce spam. Learn how your comment data is processed.

Clicky