Create
cancel
Showing results for 
Search instead for 
Did you mean: 
Sign up Log in

SourceTree keeps asking to authenticate again over and over...

Craig Schomp May 4, 2015

I'm using source tree, am getting fetch updates but on a fairly regular schedule, get a popup to re-authenticate. Why? How do I fix it?

sourcetree-authbox.jpg

26 answers

62 votes
garrypas February 23, 2018

This is infuriating. Huge bug has existed for months. Will it ever be fixed? Time to dump Atlassian and their broken toolset.

Talha Ashfaque June 28, 2018

+1

Like # people like this
Axel Deblasi August 13, 2018

+1

Like # people like this
EtayRock August 13, 2018

+1

Like # people like this
David Bermudez August 13, 2018

Im suffering from the same symptom.  I've already setup the SSH authentication method and it still asks for password over and over again.  Sometimes 3 times in a row!

Like # people like this
Paulius Pupeikis August 13, 2018

 

 

I figure out the problem that I was having. For some reason our network DNS shows both IPv4 and IPv6 addresses of Bitbucket. The IPv6 addresses are unreachable but Git Credential Manager which is used by Git which is used by Source Tree by default try to connect using IPv6 and just timeout. Further problem is made worse by faulty logic in Git Credential Manager which cannot distinguish between network timeout and invalid credentials. Thus network times out, Git Credential Manager thinks that credentials are wrong and asks again and again and again.

Web browsers can work around this problem by trying both IPv4 and IPv6 addresses. Git credential manager for some reason cannot do this so the only way to fix the problem is to either disable IPv6 or add IPv4 addresses of bitbucket.org and api.bitbucket.org to the hosts file.

Like # people like this
David Bermudez August 13, 2018

I am using SSH and it still asks for password all the time...I am using SourceTree the latest version.

Grigory Zhadko August 14, 2018

+1

dkeulen August 22, 2018

+1

GOH JIN JIE September 6, 2018

+1 really frustrating

wayne-letrung September 20, 2018

Atlassian is now a billion dollars company. Do you think they care about these small issues? Where is the $$$?

Like Ovidiu Gabriel likes this
Ken Foskey September 20, 2018

@wayne-letrung .  There are a few solutions to this.  Upgrade git on your machine or  switch to ssh. Attacks will not help.

Andrzej September 25, 2018

@Ken Foskey, I deeply understand @Wayne Le-Trung. What is left to us besides the attack if issues with authentication are here for literally years and keep returning from different angles. For me it happens once a few months that I have to fight with it and try "a few solutions to this". Are we in XXI century or not?

Like # people like this
David Bermudez October 1, 2018

Still not resolved.  My sourcetree connects to Bitbucket, not Git Hub....and I am using SSH and I get the annoying REAUTHENTICATE pop up every 10 minutes.  It's annoying and frustrating.  How can they mess up something so basic and important?  Are there any steps to follow?  I don't want the  "You have to do this" narrative...I want a step by step solution because I can't find anything and I have tried everything everybody has said here and nothing works.

Like # people like this
Jia Ming Li October 2, 2018

Same Issue here, the login popup keeps coming up, I know I have entered the correct password, because I have enter the same username/password on website and GitHub Desktop it works.

Like bak4 likes this
Ahmad Khundaqji October 8, 2018

The same issue goes here here, the login dialogues keep stacking up till your memory goes out

Anton Rukhlin October 15, 2018

+1

snarlynarwhal October 19, 2018

+1

Zoran Gavric October 23, 2018

One correction though, it has been YEARS...

Like Ovidiu Gabriel likes this
ekraijenoord October 31, 2018

Issue still exists and has not been fixed, it's anoying to keep authenticating with the idea my username/password is wrong. No message just keep popup asking for authentication....

Like # people like this
Ben Ishiyama-Levy December 7, 2018

same issues!

for all my team. seriously considering alternatives

Charu Sharma April 25, 2019

+1

9 votes
Adas Lesniak April 14, 2016

Hi

 

I had the same. Very annoying. Finally I figured out it had something to do with my account being remembered twice. As myRepoSiteName.com and http://myRepoSiteName.com ->

remove the second one as short version will be added automatically. It helped in my case. Hope it works for you as well.

 

Best

Adas

Luigi Verri May 16, 2016

Ty Adam!!
I had Bitbucket account saved in the first and second position (short and long version) in the "saved passwords " list.

Source Tree kept asking the third saved password, continuously.

I deleted the long Bitbucket version. Your solution worked for me!!

Luigi

Thomas July 23, 2017

Yes - this solved, I had >1 account saved as well.

Add you BitBucket account, use the Oauth verify account - then ensure you only have one BitBucket account - set that one as default - close down SourceTree and start up again - finally the incessant prompt gone - +1 vote for this.

Dave Masino September 16, 2017

Switching to Oauth verify worked. Thank you! This was maddening ... 

downplusb June 30, 2018

+1 for @Thomas 's oAuth suggestion. That worked for me. Thank you, those prompts were driving me crazy. 

2 votes
Jim Geppert March 24, 2018

Nothing worked for me until I dropped the sourcetree data and restarted:

1.) Take a screenshot of the sourcetree repo bookmarks so you will remember what they are

2.) Quit SourceTree

3.) Delete ~/Library/Application Support/SourceTree

(This removes all of sourcetree's internal data...bookmarks included)

4.) start SourceTree.

You have effectively Re-installed sourcetree now.  

5.) click remote and you will prompted for your bitbucket credentials

You will need to add back your bookmarks but this is very easy (just drag and drop your project folders onto the source tree view after the restart).

HusamAamer May 5, 2020

Thank you

2 votes
Tim Crall
Rising Star
Rising Star
Rising Stars are recognized for providing high-quality answers to other users. Rising Stars receive a certificate of achievement and are on the path to becoming Community Leaders.
May 4, 2015

The best way to avoid this would be to use SSH but Stash should be able to store your password.

 

Go to Tools->Options->Authentication and make sure that your hostname, username, and password are all saved there.

 

Screen Shot 2015-05-04 at 1.33.55 PM.png

shaulbehr May 6, 2015

I have the same problem, and my password is supposedly saved in SourceTree...

Josh Noe May 9, 2017

I've resorted to removing all repos from Sourcetree except for one, which uses SSH. I still get this incessant popup.

organism365 May 23, 2018

This worked for me. :)

1 vote
adamscoble January 7, 2019

There's a number of answers already, but this particular process seems to have fixed it for me on Windows 10:

1. Uninstall SourceTree using Windows' "Add/Remove programs"
2. Navigate to C:/Users/<YOUR USERNAME>/AppData/Local/
a. Delete /Atlassian/
b. Delete /SourceTree/
3. Open Credential Manager and then Windows Credentials
a. Delete any reference to Atlassian or SourceTree
4. Reinstall SourceTree
5. In SourceTree open Tools -> Options
a. Click the Git tab
b. Click Update Embedded (if this fails you might need to close any Git/SSH processes including Pageant)
c. Click Embedded to use the Embedded Git version

I've been operating for awhile now without being prompted. Though I use SSH, not sure if this solves it for non-SSH use (or at all).

1 vote
Thomas October 31, 2018

As far as can make out this is caused by having multiple github logins. One thing that - does not resolve, but might work around it - is to remove any unused/old bookmarks (folders) - so if you open a new tab - you have a the list of repositories SourceTree has used. You can then remove unused ones (not from disk, jsut remove the bookmarks).
That workaround did it for me.

If you then need to work with one of the "old" folders again - you can of course just open this one (so potentially a workaround is to just open the current folder/project you're on in Sourcetree - and clear out your bookmarks).

Probably someone (might already be in the above) will have a command line script to clear all sourcetree bookmarks. ... 

1 vote
Francisco Mercado September 2, 2018

None of the steps above worked for me. The underlying problem has to do with the store manager for Windows. Please follow this blog to update the credentials manager.

https://codeshare.co.uk/blog/how-to-solve-the-github-error-fatal-httprequestexception-encountered/

After following those steps make sure you set the latest version of the credentials manager.

git config --global credential.helper manager
Chad Paynter September 25, 2018

Thanks Francisco, this solved it for me!

Anton Rukhlin October 15, 2018

yes, but the same does not happen for GitHub...

1 vote
Brendan Patterson
Rising Star
Rising Star
Rising Stars are recognized for providing high-quality answers to other users. Rising Stars receive a certificate of achievement and are on the path to becoming Community Leaders.
November 29, 2017

Alas, I tried everything I could think of including the above, wiping completely, reinstalling. Used SourceTree since before Atlassian acquired it.   But I've had to switch away.

Any app that prompts the user for a password every few seconds should recommend how to fix the issue along the way. 

Found the issue here: https://jira.atlassian.com/browse/SRCTREE-1747

marked as duplicate to this, but the permissions must be private:  https://jira.atlassian.com/browse/SRCTREE-1746

Hope they fix it and we can use it again in the future. In the meantime there are lots of other clients.

Michael Lyubkin January 5, 2018

Brendan, I has the same issue with the Authentication dialog constantly popping up. I managed to fix it by explicitly adding the username to all remote.url configurations.

  1. Identify all repositories bookmarked in your SourceTree app (even if hidden in UI).
  2. Open <repository>/.git/config/config
  3. Add the "username" you use to connect to GIt server to all urls like this:
    • url = ssh://username@your-git-server:port/repository

Hope that helps.

Like # people like this
Hasitha_Dharmapriya November 12, 2018

Michael Lyubkin  your solution was work for me

0 votes
Dhruwal Patel May 5, 2021

Forever unfixed issue. It still exists.

Keep popping auth dialog of old expire authentication which does not even show on accounts screen.

0 votes
Alex Usman April 10, 2021

Hi, My source tree connects to Bitbucket, not Git Hub....and I am using SSH and I get the annoying REAUTHENTICATE pop up every 10 minutes.  It's annoying and frustrating.  How can they mess up something so basic and important?  Are there any steps to follow?  I don't want the  "You have to do this" narrative...I want a step by step solution because I can't find anything and I have tried everything everybody has said here and nothing works.

0 votes
Alex Usman April 7, 2021

I fixed this by switching to the system git rather than in built one. Thinking about it calmly: it is not the fact that authentication fails in the first place (though a better error message would also be good); it’s the fact that it spams the ui with dialogs. It needs some sort of error icon to show that there is an authentication failure and/or print in the log. One pop up dialog is fine. Constant dialog spam is just bad ui.

Kristian Luck June 14, 2021

This may have been my solution a long time ago, but recently the "terminal" link would not open a terminal window for the active repository. The only solution to that problem was to switch back to the embedded Git. But the annoying login window now keeps appearing. So now I have to choose between suppressing the nagging login window or being able to easily open a Terminal window. Sigh...

0 votes
Esra Erl February 22, 2021

I am also facing same issue, the login popup keeps coming up, I know I have entered the correct password, because I have enter the same username/password on website and GitHub Desktop it works. If you found any solution Please let me know.

0 votes
Jacob H. August 23, 2019

For me on Mac, I tried many things suggested by other users, including deleting preferences files and Keychains, but what eventually worked for me was switching from the Embedded Git, to the System Git, in the SoureTree Preferences > Git. 

It seems odd to me that this works, considering that they're both on the same Git version, but I verified it was really the fix by switching back to the Embedded Git again, and the problem came back, so I switched to System Git again, and haven't had a problem.

AlexandreAlvarez December 17, 2019

Thank you, i was going mental over this!

Tahir Malik (66402) March 6, 2020

it keep on taking me to 2FA, where my 2FA is already disabled. 

0 votes
oxnox April 18, 2019

What's even worse is I have already uninstalled Sourcetree and wiped all traces of it I could find, partly because of this issue.

And guess what - 6 month after uninstalling, I STILL OCCASIONALLY GET THESE POPUPS!!!!!! Usually 3 on top of each other!!

 

WTF, ATLASSIAN!!!!!!!!!!!!!!!!!!

0 votes
Anuj Kumar February 19, 2019

Go to

Preferences->Accounts

Then click on add and add your public github account there .Set this github account  as default .

The pop-up will not come again.:)

0 votes
chinmay2312 January 29, 2019

This bug is extremely frustrating, and I was unable to solve even after:

  • Changing password
  • Removing all saved passwords/accounts in SourceTree
  • Updating git
  • Setting up Git Credential Manager by Microsoft
  • Reinstalling SourceTree

 

This worked for me:

  1. Manually clone the repo using "git clone <repo-url>" at target location
  2. In SourceTree, under "Add" tab, add the repo from target location
0 votes
Danny van Deutekom November 28, 2018

I resolved this issue by removing all `bitbucket` and `sourcetree` passwords from my keychain. After restarting SourceTree, it asked me for my password one last time.

  • macOS 10.14
  • SourceTree 3.0.1
0 votes
Arielle Adams November 7, 2018

Tip for this issue:

Check to see if SSH Pageant is saving your SSH key.

0 votes
rlitsetorp October 1, 2018

Windows authentication manager was remembering old accounts not in use anymore. Just delete those in the authentication manager in controlpanel.

Anton Rukhlin October 15, 2018

i did that. git asked me for the passwords again, but "forgets" the password next time i do a "git push" into a bitbucket repo. i guess my problem is soemthing else

0 votes
Ken Foskey August 13, 2018

Note that I have switched to ssh from https / ssl.   I no longer have this issue.  This is a work around not a solution.

David Bermudez October 1, 2018

I was using https/ssl and switched to ssh and still have the same issue no matter what I do.

Arielle Adams November 7, 2018

@David Bermudez is your SSH pageant saving your key? Check that your configuration is right.

0 votes
Bhawna Rani August 8, 2018

Finally, By using O'Auth type under Authentication tab and setting it to default worked for me. This issue should be fixed because it took me 3 days to figure out and it was frustrating

David Bermudez October 1, 2018

I am using O'Auth and it still asks for entering the password every 10 minutes or so.    And I am using SSH.

0 votes
Thomas March 26, 2018

Jim Geppert's suggestion seems to work - or at least allow you to pinpoint at what point you start getting these prompts. Fon Win users: 
https://confluence.atlassian.com/sourcetreekb/how-to-wipe-sourcetree-preferences-412484640.html

0 votes
Greg Smith February 23, 2018

This is driving me absolutely nuts. It's been a problem for a while but not seems to be no way or working around it. It just constantly asks for the password and never actual works. Command line is fine. Fix your app.

Ken Foskey February 25, 2018

I have noticed that this only happens on a client's bit bucket account.  They have a lot of automation that signs on constantly and many users overnight.   If I work at night I have issues, during the day it is much better.

It appears to be a licensing issue,  not an application issue in my case.   Check the licensing on your bit bucket account and ensure that it is sufficient.

I have never had an issue on my companies account.

That being said a better error message would make this more obvious to the user.

Greg Smith February 26, 2018

So I fixed this by switching to the system git rather than in built one. Thinking about it calmly: it is not the fact that authentication fails in the first place (though a better error message would also be good); it’s the fact that it spams the ui with dialogs. It needs some sort of error icon to show that there is an authentication failure and/or print in the log. One pop up dialog is fine. Constant dialog spam is just bad ui.

Like Jacob H. likes this
Ken Foskey February 26, 2018

I suspect that behind the scenes the system is being constantly polled and eventually it builds sufficient errors that it stops.   This counter is never cleared and when you try an actual operation it reports the error at that point.

 

It would be good if I could reduce polling on certain systems and also reset the counter so that the system correctly retries.

Ken Foskey March 26, 2018

I have noted that switching system sign on on the user account and back again sometimes clears the issue.   I do continue to experience this overnight on the client account.  This is important once I clear issue during day it works fine for the day during the day time.

Overnight there are many more users on the client's account (Australian night time,  European day time with many more Spanish programmers than Australian ones.).   I can sign on and immediately have to sign on again overnight.

0 votes
Ken Foskey January 24, 2018

I have had a problem that I have had to shut down sourcetree totally on mac (command Q) and restart in order to push.  I could then successfully push my changes.  Strangely I can always pull changes, only on push did it fail.

I am now experiencing an issue that I have to constantly connect using auth button to push.  Lasts about 5 minutes and I have to connect again.  I can still pull new changes.

Note I am on Mac.   I am not being asked for my Mac Password,  it is the actual auth to Bit Bucket that I have to sign on to, I am using google Auth.   I did have github sign on as well.  I removed this and my original bit bucket account then reinserted.   No difference.   Given it is mac password it is not issue 1947.

As noted elsewhere 1946 is private,  cannot review for similarity.

0 votes
Pavan Kalyan Tolety April 19, 2017

Remove all other authentications section in sourcetree other than git hub.

Then click Add or either go to Hosted repositories(to quickly check if it was successful) and click on edit accounts.

In credentials select OAuth and select refresh token. You will be redirected to bitbucket website and click on Grant access.

Now goto your fresh account in sourcetree and select Set as Default.

Done. Now you should see all your repositories in hosted repositories. It shows login error if it is not successful

Suggest an answer

Log in or Sign up to answer
TAGS
AUG Leaders

Atlassian Community Events