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

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?

3 answers

1 accepted

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!

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.

OMG thanks, It was driving me crazy

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

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.

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

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.

Does anyone know what the password file is called?

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

THANK YOU!

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

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

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.

THANK YOU !!!

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.

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.

1 votes
GMM297 I'm New Here Nov 25, 2017

JUST GO TO TERMINAL IN THE CORRECT FOLDER

TYPE: GIT PUSH

USERNAME AND PASSWORD 

DONE!

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

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

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

Suggest an answer

Log in or Join to answer
Community showcase
Brian Ganninger
Published Jan 23, 2018 in Sourcetree

Tip from the team: workflow and keyboard shortcuts

Supported Platforms macOS Sourcetree has a lot to offer and, like many developer tools, finding and using it all can be a challenge, especially for a new user. Everyone might not love ...

238 views 0 3
Read article

Atlassian User Groups

Connect with like-minded Atlassian users at free events near you!

Find a group

Connect with like-minded Atlassian users at free events near you!

Find my local user group

Unfortunately there are no AUG chapters near you at the moment.

Start an AUG

You're one step closer to meeting fellow Atlassian users at your local meet up. Learn more about AUGs

Groups near you
Atlassian Team Tour

Join us on the Team Tour

We're bringing product updates and pro tips on teamwork to ten cities around the world.

Save your spot