Showing results for 
Search instead for 
Did you mean: 
Sign up Log in
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

SourceTree keeps asking Atlassian username and passwrod and athentication keeps failing


First, I'm using SourceTree on my PC number 1 and it's been working well.

Now I have a second PC, a virtual machine, and I have been using SourceTree for a while. Although SourceTree has frequently asked username and password, it has been working until very recently.

From today, every time I try to pull, the small screen asking for Atlassian username and password appears. Even though I enter correct username and password, it does not work, and the same window keeps appearing.



From "Can't log in?" button, I have updated my password.

This new password is working for Options > Authentication > Accounts > Add for both PC number 1 and 2 (virtual). In both cases, it says "Authentication is OK".

However, now the small window keeps appearing in both PC1 and 2. I enter the username / email and the new password, but ~5 seconds later, the same window appears.

Now I cannot do anything with SourceTree in both machines.

Any suggestions, anybody?


Should I try something like below as suggested somewhere else?


In PC1, Remote URL is set as

but still the same screen and Pulling is failed with an error:

git -c diff.mnemonicprefix=false -c core.quotepath=false --no-optional-locks -c credential.helper= -c credential.helper="xxxxxxxxxxxxxxxxxxxx/GIT-CR~2.EXE" fetch origin
fatal: HttpRequestException encountered.
   An error occurred while sending the request.
remote: Invalid username or password. If your organization manages your account or you've enabled two-step verification, create an app password to log in:
fatal: Authentication failed for '"
Completed with errors, see above.



Then I thought I can still use command line.

git pull origin master

But the same small screen appeared. When I entered username and password, this error happened.

fatal: HttpRequestException encountered.
   An error occurred while sending the request.

Following that, another small window appeared.


Then I entered the same password again. And finally it seemed to work.

 * branch              master     -> FETCH_HEAD
Already up to date.

But when I tried to Pull from SourceTree GUI again, it failed with the same error as before.


Git version (both PC1 and 2)

Embedded git version 2.17.1/LibGit2Sharp 0.24.0 + git-lfs v2.4.2


SourceTree version (both PC1 and 2)


Windows 10



2 answers

1 accepted

2 votes
Answer accepted
Ana Retamal Atlassian Team Aug 09, 2018

Hi Kouichi!

There’s a bug with Windows Git authentication and Bitbucket. The older version of GCM that shipped with Git has a bug with Bitbucket. It seems to be partially fixed in GCM 1.17.0, but 2FA won't be fixed until 1.17.1.
Our developers have submitted fixes to MS and are waiting for them to ship. We are about to start a private beta with a large amount of change and it will end up bundling the fixes as soon as they are available. This has been completely unexpected and our developers are working hard on it to get it fixed as soon as they can.

Thanks for your support!

In SourceTree, with System Git 2.19.0, the problem has been partially solved.

Although still keep asking authentications, I can push from SourceTree GUI now.

Now, SourceTree with System Git 2.19.1, authentication stopped working again.

Also see

Now with SourceTree 3.0.8 for Windows and using System Git version2.19.2, for the first time since August, I succeeded in Pushing from SourceTree GUI.

Suggest an answer

Log in or Sign up to answer
Community showcase
Published in Sourcetree

Tip from the team: configure your repos for hosting goodness!

Supported Platforms macOS Windows We recently introduced support for additional hosting services such as GitHub Enterprise, GitLab (Cloud, Community Edition, Enterprise Edition), and...

7,105 views 5 13
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