I'm using Stash, Sourcetree and Crowd. Crowd authenticates with our AD server. One of our users' AD passwords expired today and he went to do some work via sourcetree and it wouldn't let him communicate with stash properly
He set up the repo initially as HTTP when he first cloned it. It asked him for his username and password and he says he remembers clicking "Save/remember password"
Where can I have him reset/remove these credentials.
I've already worked around the issue by setting up SSH keys for this user, but I'm interested in what the fix would be. Presumably something via the command line, as I've been through every GUI screen I would think could have the setting in it.
The only thing that worked for me was navigating to C:\Users\USERNAME\AppData\Local\Atlassian\SourceTree and removing the passwd file.
Once this file is removed, restart SourceTree and execute a fetch or something else that requires access to the repo in question. SourceTree will then prompt you for your password, rewriting the cached credentials.
I hope this helps. Shoutout to my buddy Nick for the assist.
If you're a macOS user, Auke states below that "you can find the password files per repo it in ~/Library/Application Support/SourceTree"
This was the answer for me to delete the C:\Users\USERNAME\AppData\Local\Atlassian\SourceTree\passwd file, however, I also needed to change the username, and there was no way to do this through the sourcetree interface.
I found a file C:\Users\USERNAME\AppData\Local\Atlassian\SourceTree\userhosts which had the wrong username. I changed it there and restarted and then it was able to push github repos to the correct username.
thanks David. your solution worked for Authenticate error.
1) the failure ocurred on my SourceTree v2.3.x.x, when I updated my network Windows password.
2) When I ran ST v184.108.40.206 executable, no authentication error was encountered.
3) When I re-ran v2.3.x.x again, the authentication error resurfaced again.
4) Then, I came upon your solution and tried it, v2.3.x.x is working fine now. The original password file was dated ard 2 months ago, likely the last time it was changed before i upgraded to v2.3.x.x?
5) Before all these, i also tried the Tools-> Options -> Password change method.
It says authenticated after giving the correct password, but when I fetched my Repo, the authentication will fail. So apparently the passwd file in (4) could not be updated, which caused repo actions to fail?
Maybe it's a version bug?
Thanks - this also worked for me - however as it's a central file - if you are using other accounts through SourceTree (e.g. BitBucket, GitHub) then you may want to just remove a single account line from the file rather than deleting the whole file.
Plus, as the User account used by SourceTree is also referenced in answers here - To specify a specific user account (which is not the default) I found that setting userid in the repo path (Settings > Remotes > Edit) e.g. http://myRepoUser@myrepo:3000/organisation/myrepo.git worked for an internal git server.
Not working for tried many times to login to git in vsonline it was working just fine, but removed the keys from keychain, also reinstall and tried to clean up everything, when i type the credential it does not work and show the following on my mac:
fatal: Authentication failed for;
Even the credentials are correct
Yup did the trick, the problem started when i changed my Atlassian password, after few days i opened source tree and i couldn't login with new password, it kept asking for password over and over again.
Once removed the passwd file then it all worked! They should address this on the SoruceTree app.
I had a similar problem on Windows 10 when I wanted to use a new account on GitHub. SourceTree was using cached credentials, and not displaying them on its internal dialogs, and I struggled to find a way to clear them. I only worked out what was going on when I tried from Git Bash and had the same problem. The credentials were definitely NOT on Tools -> Options -> Authentication.
The reason is SourceTree uses the Windows Credentials Store, so rather surprisingly you have to go to Control Panel. Then Users and Accounts/Manage Your Credentials/Windows Credentials (it defaults to Web Credentials, which isn't what you want). I had an entry for github.com under 'Generic Credentials'.
I deleted this from the credentials screen and then tried to push from SourceTree, which now asked me for the new credentials and performed the push using them.
I don't know how easy Microsoft have made it for third-parties to at least show these credentials on their screens, but I would think this would be a reasonable enhancement for SourceTree to make.
On SourceTree 2.7.6 you can easily reset your repo credentials, without having to mess manually with files, by following these steps:
Respectfully I must disagree with Steve's answer: It doesn't work at least for me because in Authentication there's no saved credentials for bitbucket.org and stash. I updated all my credentials for bitbucket and other vendors on the web, later i have to find out that i cannot log in to bitbucket in sourcetree, and there's no way for me to clear saved credentials. Except maybe wipe the local storage where sourcetree saves the preferences etc. but that can't the solution.
Edit: environment is windows.
Just for the sake of having complete use cases here... I had what I thought was the same problem. Turned out that our auth scheme had changed and we started logging in with just the username portion of our email addresses... so jrypkahauer instead of firstname.lastname@example.org. The real problem came when I added "email@example.com" to the list of default usernames for our domain.
So effectively I had inadvertently made it impossible for myself to use the correct username on the domain where our git repositories all live.
It took me nearly 4 months of fighting this to figure out why ONLY SourceTree forced me to use an old, invalid username but would still prompt for the password if it was provided. Today I went panel by panel thru the entire Preferences UI and finally found this one.
Mac OSX 13.3.3, deleting password files doens't work for SourceTree 3.0.1 when trying to connect to Atlassian Bitbucket v5.11.1 self-hosted server. I managed to connect to Cloud BB and was only then able to get into the app's options otherwise it's completely useless. I still am unable to use it with the above BB server we're hosting so another broken cr*p from Atlassian.
You can also simply add your username in front of you repository address: e.g: git clone https://firstname.lastname@example.org/scm/project_x.git
You will then be prompted to put in your new password on your next pull or push. From there you will not be prompted for a password until you change it again.
Maybe u guys can give this a try:
1. Goto Tools > Options
2. Click Authentication tab. There's sections(for me Accounts and Git Saved Passwords) for previously saved passwords.
3. Just click on the desired account. Details for the account will be shown with Edit and Delete buttons
4. Click Edit. It will prompt a window for you to put your password.
This worked for me (Sourcetree v3.2xx on Windows 10):
Problem: Failure to Authenticate:
Reason (why probably): because initial registration was done using Google Auth APIs, therefore...
1. Click "Remote Tab > Edit Accounts
2. Click on your saved bitbucket account
3. Click "Edit" again
4. click "Authentication" and select "OAuth"
refresh and you should be set ..hopefully
A vulnerability has been published today in regards to Sourcetree for Windows. The goal of this article is to give you a summary of information we have gathered from Atlassian Community as a st...
Connect with like-minded Atlassian users at free events near you!Find an event
Connect with like-minded Atlassian users at free events near you!
Unfortunately there are no Community Events near you at the moment.Host an event
You're one step closer to meeting fellow Atlassian users at your local event. Learn more about Community Events