Hosted git repo password changed now SourceTree can't push
Asked by jus opi:

This has happened on several occasions across several SourceTree versions. Our hosted git repo utilizes our domain passwords in order to commit. As such our passwords change every 60 days. I use SSH from the command line just fine however ever since the last few SourceTree updates, I am unable to utilize the setup wizard that was once present. Therefore I cannot seem to successfully setup pushing changes back to their remotes. Please advise.

here is a screenshot of the dialogs - Untitled.png

After I click 'allow' and enter my password, it just repeats the cycle before finally erroring out of the process.  
[](https://community.atlassian.com/t5/Sourcetree-questions/Hosted-git-repo-password-changed-now-SourceTree-can-t-push/qaq-p/342712?attachment-id=9650){#link_116a84fe617f78}  
[](/tnckb94959/attachments/tnckb94959/sourcetree-questions/10246/1/Untitled.png){#display_116a84fe617f78_0}  
[](https://community.atlassian.com/t5/Sourcetree-questions/Hosted-git-repo-password-changed-now-SourceTree-can-t-push/qaq-p/342712?attachment-id=9651){#link_116a84fe617f78_0}  
[](/tnckb94959/attachments/tnckb94959/sourcetree-questions/10246/2/sourcetree-keychain-application-password.png){#display_116a84fe617f78_2}  
[](https://community.atlassian.com/t5/Sourcetree-questions/Hosted-git-repo-password-changed-now-SourceTree-can-t-push/qaq-p/342712?attachment-id=9652){#link_116a84fe617f78_1}  
[](/tnckb94959/attachments/tnckb94959/sourcetree-questions/10246/3/sourcetree-password-prompt.png){#display_116a84fe617f78_4}


Answers:
author: Jeff Sprague
body: I just spent two hours trying to figure out how to make the latest version of SourceTree (Mac 2.4) log into our company's repo after the mandatory corporate password change. Nothing I could find on-line worked. Using the SourceTree terminal to relog in via a "git pull" did nothing. Nothing in the account menus helped.

What finally worked was going to the "Keychain Access" utility on the Mac, searching for the github server that we use and deleting ALL stored keys. Then the next time I started SourceTree, it asked for my new credentials and now it looks like I'm finally online again.

This is a SERIOUS usability flaw in the Mac version of SourceTree.

comments: author: david-mckinnon
body: After updating my corporate password in Safari, it prompted me to update other passwords.

In Keychain Access this updated all the internet passwords (Kind = internet password) for the Bitbucket repo's domain, but not the application password (Kind = application password) which SourceTree uses.

sourcetree-keychain-application-password.png

I had to delete that one, then SourceTree prompted me for a new Password.

sourcetree-password-prompt.png

I couldn't find anywhere to do it from the SourceTree front-end either.


author: Vasiley Borschenko
body: It is amazing how serious guys leave such gaps in its product.


author: Marco Davila
body: It works for me, just deleting all the Bitbucket related keychain. Thank you!


author: DJanoskova
body: Thanks!


author: Mayrhofer, Wolfgang
body: In Windows, I found and deleted C:\\Users\\\<userid\>\\AppData\\Local\\Atlassian\\SourceTree\\passwd for a new password prompt. Serious usability issue for sure.


author: Sandy Currier
body: The problem still exists in 2.7.6 (177). Deleting "\~/Library/Application Support/SourceTree/\<username\>@\<yada yada yada\>" results in SourceTree prompting for a new password. SourceTree does not have to be restarted after the delete.


author: shahidullah.khan
body: I have the same issue on my Mac. I have removed the SourceTree key from my "Keychain Access" utility from mac. After removing the key connect to my repo via SourceTree and perform Push/Pull activity, It asked for password and an option to save the password to keychain.


author: Thomas_Borghs
body: I found a credentials file in \~/Library/Application Data/SourceTree. The file was named \<username\>@STAuth-\<server URL\>. Deleting this file (moving it to another location, before deleting it) and restarting Sourcetree prompted a password dialog when fetching a repository on the server.

I'm running Sourcetree version 2.6.3 and Mac Sierra 10.12.6.

comments: author: JinYoung Choi
body: Application Data directory doesn't exist.

\~/Library/Application Support/SourceTree

this is right.


author: Bal?zs Szakm?ry
body: You need to remove/edit the saved credentials in Options\\Authentication.

comments: author: jus opi
body: this is for the Mac version, for which I have been unable to find any dialog/menu option for Authentication. Preferences does not contain an Options/Authentication dialog that I have found.


author: Bal?zs Szakm?ry
body: Sorry I have no access to a mac to check, but you need to find the place where it stores your credentials and it is going to be global to SourceTree, not in the properties of the repo.


author: Andrzej Zalewski
body: I can confirm that this worked on Windows.

Thanks for the tip.


Tags: mac

ssh