SourceTree keeps failing credentails Edited

git -c diff.mnemonicprefix=false -c core.quotepath=false fetch --prune origin
remote: Invalid username or password. If you log in via a third party service you must ensure you have an account password set in your account profile.
fatal: Authentication failed for ''


This started happening after I updated SourceTree (Windows) to v2.1.10. It tries to run the command 4 times and then fails. It doesn't ask me for a password, it just fails.

During the installation I've been prompted to login to Atlassian, which I did

I've tried the following, without success:

  • removed the username from the remote URL in Repository / Repository Settings / Edit origin;
  • and from the Username field;
  • replaced the username with my account's email;
  • removed all of my saved credentials from Tools / Options / Authentication;
  • recreated the credentials for my Bitbucket account (which has been verified during the process);
  • set said credentials as default;
  • uninstalled and reinstalled SourceTree.

Nothing, same problem that's driving me crazy. The only workaround I've found is to put both username and password in the remote URL, which is unacceptable in more than a very short term.

What credentials is SourceTree using, and where does it take them?!

Executing the same command from the terminal, git correctly asks me for the password. When been given, it does the job just fine.

What should I do to fix this?

1 answer

5 votes

Looks like this issue was the culprit. Updating the embedded git seems to solve the problem.

A really obscure and unintuitive solution, if you ask me.

Guys, this is bonkers. Why was the embedded git left behind to v1.9.5 when I updated, if this has been proven to be problematic?

The updating process needs some rethinking, IMO.

thank you for that answer and link updating the embedded git solved my problem

This one worked for me too. Thank you very much.

Suggest an answer

Log in or Register to answer

Stay in touch

Be the first to know what's trending on Atlassian Community