How to configure Bitbucket app password with SourceTree?

Viewed 13495

I enabled two-factor authentication in Bitbucket, then created an app password. Where should I configure this app password in SourceTree?

3 Answers

For anyone finding this in 2021, another alternative (If you've been using other Bitbucket repositories all the while without having this problem). My issue is that I still had a very old repo still using the HTTPS git URL.

For example, issuing git remote -v in my legacy repository revealed something like:

origin  https://myusername@bitbucket.org/myusername/myrepository.git (fetch)
origin  https://myusername@bitbucket.org/myusername/myrepository.git (push)

Simply take the SSH version of your repository instead and set it with (using above url as an example):

git remote set-url origin git@bitbucket.org:myusername/myusername.git

You can do a sanity check by issuing git remote -v again to confirm that the new origin URL has been set.

Once this is set, you should be able to push to your remove without issues.

Related