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
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
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.
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:
No matter what tools I used (including SourceTree), nothing worked. The server kept returning: "Create an app password"
Basically you must
Would be so nice if the server would have returned this in the response instead of suggesting to use an app password...
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/
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.