Authentication failed to bitbucket

前端 未结 25 936
佛祖请我去吃肉
佛祖请我去吃肉 2020-12-22 23:29

I\'m trying to push my project via the https protocol on bitbucket using sourcetree.
But I can\'t connect to bitbucket with my login and password (which work on the webs

相关标签:
25条回答
  • 2020-12-23 00:08

    The issue for me was that I did not have an account added to Sourcetree.

    Adding an account allowed me to push to my repo:

    Tools > Options > Authentication > Add > Refresh OAuth Token

    0 讨论(0)
  • 2020-12-23 00:08

    I was trying the git push --all bitbucket call and it was throwing back the "fatal: Authentication failed for 'https://..." response. The solution that worked for me was to change the command to:

    git push --all https://{username}@{url}

    On Windows, this popped up a dialog that allowed me to enter my password and the push worked.

    0 讨论(0)
  • 2020-12-23 00:09

    After fighting with this for a long time, it looks like I found something that seems to work. I was optimizing the urls to not include the username (keep it as generic as possible), but the authentication dialog kept popping up:

    I tried everything that came into mind, such as:

    1. Enable and disable MFA (Multi Factor Authentication)
    2. Create app passwords (again, with and without MFA enabled)

    No matter what tools I used (including SourceTree), nothing worked. The server kept returning: "Create an app password"

    Basically you must

    1. Use the url including the username (e.g. https://myusername@bitbucket.org/...)
    2. Use an app password created in bitbucket

    Would be so nice if the server would have returned this in the response instead of suggesting to use an app password...

    0 讨论(0)
  • 2020-12-23 00:10

    I tried everything else and found helpless but this indeed worked for me "To update your credentials, go to Control Panel -> Credential Manager -> Generic Credentials. Find the credentials related to your git account and edit them to use the updated passwords".

    Above Solution found in this link: https://cmatskas.com/how-to-update-your-git-credentials-on-windows/

    0 讨论(0)
  • 2020-12-23 00:10
    • Inside company but will held true anywhere.
      • Logout from Bitbucket ( in case you are using)
      • Login with your credential
      • Go back to console
      • Fire the same command
      • It will ask for password - Provide it.
      • You are good to go.
    0 讨论(0)
  • 2020-12-23 00:10

    OBSOLETE ANSWER - VERIFIED NOVEMBER 17, 2020


    On Mac, I needed to go to Preferences > Accounts, then add a new account as Bitbucket Server and enter my company's bitbucket server URL. Then I had to choose HTTPS as the protocol and enter my username (without @email) and password.

    Also I set this new account as the default account by clicking the Set Default... button in the bottom of the Preferences > Account page.

    0 讨论(0)
提交回复
热议问题