It's not the same without you

Join the community to find out what other Atlassian users are discussing, debating and creating.

Atlassian Community Hero Image Collage

Getting "fatal: Authentication failed for..." error

Brian Brewder Aug 14, 2017

In SourceTree, I'm getting the "fatal: Authentication failed for..." error when I try to Push/Pull from origin. 

The Git terminal from SourceTree asks for my username/password and, when I enter it, it works correctly (I'm able to do a push/pull anyway). However, nothing I've tried will allow me to use the push/pull buttons in SourceTree. I've updated my Git username every place I've been able to see something that resembles a username, I've gone to Tools > Options > Authentication > [My Account] and set the password (which is a private access token).

I saw a similar question that mentioned "There is a SourceTree Application password stored in the login keychain." But I have no idea what the login keychain is or how I can fix it in SourceTree.

Details:

- SourceTree version 2.1.10.0

- Git version 2.7.0

- Windows 10 Pro, 64 bit

- origin server is Visual Studio Team Services

I'm not sure why it stopped working (I haven't changed my VSTS password and all my private access tokens are still valid), but I seem to recall an odd password box that popped up a week or so ago that I believe came from SourceTree. I might have entered the wrong password, but didn't see any problems at that time (I haven't pushed/pulled since then, so wouldn't have seen any problems until today).

What am I missing?

10 answers

1 accepted

94 votes
Answer accepted
Brian Brewder Aug 14, 2017 • edited

David's answer to this question worked for me...

https://community.atlassian.com/t5/SourceTree-questions/How-to-update-HTTP-S-credentials-in-sourcetree/qaq-p/297564

The only thing that worked for me was navigating to C:\Users\USERNAME\AppData\Local\Atlassian\SourceTree and removing the passwd file.

Once that file was deleted, I just did a "Push" and it finally asked for my password. 

A note to Atlassian, there should be a much simpler way to do this than spending hours searching the Internet looking for an answer. If getting the Authentication page to work as expected is not possible, then perhaps just a button that users that are having trouble can press on the Authentication page that would reset all the passwords (basically just delete this file for us). 

Thanks a lot! I was speending 2 days touching options in the sourcetree. This answerd save my day!

justin sawchuk Aug 28, 2017

yeah it worked for me as well. I cant believe that source tree would be so lazy, this is a software thats used by millions of devs.

Like Chris Swainson likes this
justin sawchuk Aug 28, 2017

Yeah its retarded

Like Chris Swainson likes this
Akul Bhatnagar Sep 03, 2017

Awesome!!!

Marcin Radomski Sep 13, 2017

OMG thanks, It was driving me crazy

Dheeraj Sampath Sep 13, 2017

I resorted to git bash since source tree stopped working. Thanks for the fix. Sourcetree! \,,/

Sargo Grigss Sep 14, 2017 • edited

For some retarded reason the field to type in your email adress is greyed out and it has an email adress in it that doesn't even have an atlassian account. I can not change my email adress whatsoever. I've deleted the account file and restarted it. I've checked the tools bar into the authentication and removed everything there. I've even reinstalled source tree and it still won't let me change the email adress. Holy shit I regret updating to this horrible version. I'm stuck not being able to fetch or pull anything. Even the crash report pop up crashes when I submit this shit.

Like Dmytro Holovko likes this
Sargo Grigss Sep 14, 2017

Fix: I removed everything from sourcetree and downloaded an older version. 

Joel Dennis Sep 27, 2017

Removing the passwd file worked for me. This was driving me crazy for the past few weeks. Thanks for the solution! I was actually looking for other options to use instead of Sourcetree until finding this fix. It would really helpful if there were an easier way to force the password prompt.

Steven Jaszkowiak Oct 03, 2017

Does anyone know what the password file is called?

Eric Wolfe Oct 17, 2017

thanks! This helped a lot.  It is a pity that such a simple thing is broken.  

Ramon Ramoss Nov 14, 2017

THANK YOU!

Pavan Kumar Nov 29, 2017

It worked. Now I'm able to do all the operations in source tree tool. Thank you

Alex King Jan 03, 2018

Still working in 2018. Just solved my problem- next clone prompted for me to enter a password, and all went smoothly.

Radek Marik Jan 10, 2018

I updated the SourceTree and the authentications failed. I wiped out the SourceTree (uninstall and the directory deleted) and installed 2.4.7.0 SourceTree. I had the same problem: after asking the password to the local GIT server the session failed because of SSH_ASKPASS. I wiped out the SourceTree again and installed 2.1.2.5 version. It works normally.

SourceTree is a great tool if it works. The obvious recent modifications to the authentification code do not work.

Ari Jan 18, 2018

THANK YOU !!!

Gerardo Lopez Jan 30, 2018

It worked for me too. Stuff like this is why I down vote SourceTree when asked if I would recommend it. It actually prompts an email to my manager to go back to TFS.

Trivikram Godse Feb 18, 2018

Same here it worked for me after installing 2.1.2.5 Version. I hope atlassian is taking notes. GIT+SSH with username password does not work on 2.4.7.0. Please fix it.

dkurmanov Mar 06, 2018

I've reinstalled sourcetree and git (without credential manager and with it), generated several github acess tokens and without success.... and your solution helps! So THANK YOU ! I think that it should be in the docs or in the bug tracker :)

Immanuel Comer Mar 12, 2018

It seems that deleting (or perhaps renaming) a file worked for me as well. Thanks @Brian Brewder!

Of course, I had to find the path for MacOS.

For anyone else looking for that path it is ~/Library/Application Support/SourceTree and then look for a file similar to username\@STAuth-path.to.gitrepository.com

I simply appended the filename (just in case it didn't work). Afterward, I did a fetch (I'd imagine any server command would work) and I was prompted for a new password. 

JB Rolland Mar 27, 2018

Seriously?! a dev tool having such basic issue... I can't imagine amount of time lost by anyone using it including me

Thanks for the tips Brian

Thao Bui-Bond Apr 04, 2018

I had the same error and I saw this post, but deleting the password file did not work for me.  it turned out that my VSO personal access token was expired.  I had to renew it.  Just FYI for anybody who use visual studio online.

Sushmitha Hiremath May 16, 2018

Thank you, this worked for me as well :-)

Krzysztof Gałązka Aug 08, 2018

Thanks a million!

James Dougan Aug 11, 2018

Thanks sooo much. i have looked for hours for this. 

Thank you so much... the tip still works today!

James Dougan Aug 12, 2018

So before a fancy login box came up but my password never worked in it. But then when I detest this. The fancy login box didn't come up but a not so fancy box replaced it. The only difference is that my password worked on this one. So thanks for this :)

Robert Pal Sep 11, 2018

Thanks a lot! That was the problem!

Satheesh Davidson Sep 22, 2018

Thanks a lot

Carlos Ramirez Oct 10, 2018

Thank you!  This was exactly the answer I was looking for.

James Boswell Oct 29, 2018

Just hit this same problem. Deleting the pwd file worked.

This bug needs fixing! How many thousands of dev hours are wasted on this stupid bug!

Adeyemi Osifeso Nov 09, 2018

Thanks a lot. it worked seamlessly

Roman Kuznetsov Nov 19, 2018

Still working. Thx a lot

Amdrey Nekrash Nov 26, 2018

It's a pity, we have to do such things manually after a year...

Paolo Gianfelici Dec 01, 2018

Thanks a lot.
After 1 year this bug is still present and it almost led me to use gitkraken.
Please do better with sourcetree.

Franco Farinelli Dec 03, 2018

Still valid! Thank you so much! I was getting crazy! 

Martin Karachorov Dec 05, 2018

Thanks for the solution 
not so fancy box accept my pass :D

Thanks a lot !!! 

A week of research for this bug...

Deleting the password file of attlasian does the work !

Imar Toledo Falcón Dec 11, 2018

I do not know what to expect to fix this bug, thank you very much!

Daniel Klein Dec 18, 2018

If you have multiple accounts set up, it's not necessary to delete the whole passwd file.

  1. Make a copy of the passwd file just in case something goes wrong
  2. Edit the original file
    • You'll see a pair of lines for each set of login credentials. The first line is the username such as username@bitbucket.org. The line immediately under it is the encrypted password.
  3. Delete both lines for only the account you're having trouble with
  4. Save the file
  5. Sourcetree will prompt you for the password the next time you try to use that account, and as long as you enter it correctly, it will work and be saved
Levin Purba Dec 19, 2018

Almost the end of 2018 and this problem still persist. Deleting the passwd file was the only way to get around.

Till O'Rrly Feb 04, 2019

It's 2019 already, but still not all heroes wear capes.

Jaco Hamilton-Attwell I'm New Here Mar 05, 2019

Thank you! After 3 hours of struggling, I can finally START the introduction on bitbucket.

Pierluigi Coppola I'm New Here Mar 24, 2019

Delete of password file worked for me. THANKS

Richard Peller I'm New Here May 21, 2019

After hours of searching..... This finally worked!!!!

This is a flaw, and should be fixed!. Come on!

4 votes
Euan Brown Dec 12, 2017

If you are using sourcetree with bitbucket, I had to go in and change the Username to an email address in the file location below. I believe bitbucket swapped the log in from using usernames to email addresses but source tree wouldn't take it on it's normal login pop up screen. 

C:\Users\USERNAME\AppData\Local\Atlassian\SourceTree\accounts.json

Eric Wolfe Dec 13, 2017

Thanks for menting this, though I had to switch the Username back to our network user from the email address.  

3 votes
Collin Reed Nov 02, 2018

Go to Tools -> Options in SourceTree and then go to the Authentication tab on the Options popup. Delete all of the stored passwords. Try again, you should have another opportunity to enter authentication credentials. I'm using 3.0.8 and that worked for me.

Vincent Simonin Dec 11, 2018

That did the job for me, thanks.

Narendra Kekane I'm New Here Jan 24, 2019

Great it's work for me as well. My Source tree version was 3.0.12

Megan Moore I'm New Here Apr 22, 2019

This worked for me.  I had just updated my DI2E (Bitbucket) password, and even though I tried updating the password with the edit button in SourceTree, that didn't work.  Removing all the passwords worked.  I am using 3.0.17.

2 votes
Mandar Godse May 22, 2019 • edited

Somebody at Atlassian needs to write a blog with clear steps to resolve this issue, this continues to be an issue for many people. I had originally reported my problem in 2017 and we are in 2019 and people still seem to be struggling with basic functionality such as login.

I run into these errors every time my password is changed. Recently I had to uninstall and reinstall the software to get authenticated. Is this really a solution ? I hope somebody at atlassian takes this seriously and write a clear documentation about this issue. When done please post the link to this issue.

1 vote
GMM297 Nov 25, 2017

JUST GO TO TERMINAL IN THE CORRECT FOLDER

TYPE: GIT PUSH

USERNAME AND PASSWORD 

DONE!

Alan Rasmussen Jan 31, 2018

That was easy.  Worked for me with Window 7.  Thanks.

Like Aamir Choksi likes this
Chris Schiebel Oct 08, 2018 • edited

this was the only thing that worked for me on a mac, thank you!

1 vote
Advait Deshpande Feb 22, 2018

I am putting all the steps I tried in the sequence and finally one thing worked. The solutions are suggested by other Stash/Sourcetree Users.

Solution A,  Didn't work. Might work for others. Good Luck!

  1. Make sure SourceTree is closed
  2. Make sure the files are backed up in the following folders before removing the files
  3. Remove files "bookmarks.xml", "opentabs.xml", "userhosts" in C:\Users\<username>\AppData\Local\Atlassian\SourceTree\
  4. Remove file in C:\Users\<username>\AppData\Local\Atlassian\SourceTree.exe<random_string>\<version_number>\user.config
  5. Open SourceTree again to test if it worked or not.

Solution B.  Didn't work. Might work for others. Good Luck!

Navigating to C:\Users\USERNAME\AppData\Local\Atlassian\SourceTree and removing the passwd file.

 

Solution C. Worked. Might be due to above steps performed above.

Sourcetree > Tools > Authentication > Deleted my Stash account > Added it again.

I hope the above post helps!

Aleš Svoboda Sep 06, 2018

Thanks for summarization. Solution A worked for me.

Anton Salim Dec 07, 2018

Solution B works perfectly

0 votes
Crystal O'Mara Aug 09, 2018

I solved the issue by looking up Keychain Access with spotlight then deleted the Application password for that particular git url. I then opened the repository through SourceTree and it prompted me for a new password. The Keychain Access was then updated and worked after that

0 votes
Daniel Foster Aug 10, 2018

Nothing is working for me. This is so frustrating, I have lost days messing about with this and two of my team are also having the same issue. Its not like I have an urgent build for 100,000 users that I need to get out the door or anything. I think its time to take my business elsewhere

Alan Wasem Oct 30, 2018 • edited

ugh

0 votes
小小超 Nov 10, 2018 • edited

I delete password file and it works, soure tree is terrible

0 votes
Alan Wasem Nov 26, 2018 • edited
On my Mac for the past 3 or 4 weeks I have had to reset my .ssh key once or twice a week. The way I do this is by searching for a folder in finder (shift + command + g) ~/.ssh/ and delete the bitbucket files .pub and all others. Then in sourcree accounts it reverts to another .ssh key I have in the folder. Hold option to change the button (where copy to clipboard usually is) to show generate new bit bucket key, with option held click that new button. It will ask for a pass phrase which can be whatever and will never ask for it again and then sometimes brings up another window where you’ll have to type your atlassian password. Once source tree has generated a new key the save option is still greyed out. You have to click the drop down menu for ssh or https and then either toggle it from https or just click ssh again and you’ll see the save button enable. At this point you can copy the new ssh key and add a new key on the bitbucket settings page. I hope this helps someone it’s crazy frustrating.
Imam Priyanto I'm New Here May 18, 2019

Yes, it absolutely helped me

Suggest an answer

Log in or Sign up to answer
This widget could not be displayed.
This widget could not be displayed.
Community showcase
Published in Sourcetree

Sourcetree for Windows - CVE-2019-11582 - Remote Code Execution vulnerability

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...

419 views 0 9
Read article

Community Events

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

Events near you