Come for the products,
stay for the community

The Atlassian Community can help you and your team get more value out of Atlassian products and practices.

Atlassian Community about banner
4,293,390
Community Members
 
Community Events
165
Community Groups

Git Credential Manager for Windows Popups

I keep getting popups for "Git Credential Manager for Windows" whenever SourceTree is running.

Pretty sure the credentials for all the repositories I have open are already in SourceTree as I can update, commit, etc without issue so I'm not sure why the popups keep appearing. 

Is there something I can do to prevent them from appearing? A screenshot of what I'm seeing is below. I'm using Windows 10 x64 if that makes a difference.

screenshot.jpg

28 answers

1 accepted

This is the solution that finally worked for me:

(1) Installed Git Credential Manager for Windows.

(2) Opened the terminal by clicking the Terminal button in SourceTree.

(3) Issued the commands below:

  • git config --global credential.helper manager
  • git config --global credential.useHttpPath true

The first command set the credential helper to use Git Credential Manager for Windows.

The second command was necessary for me because I use repositories that are on the same server/domain but each repository has different credentials.

This is SOOOOOO broken.  Every 10 seconds I get a popup asking for a password.  No reason.  No indication of which account it's for, just a generic "provide a username and password".  So I have no idea which repository it wants a password for or even what program is requesting it.  No indication of whether the password fail or succeded, and after a while the box just reappears.  Over top of stuff, in the middle of presentations, etc.  This is effectively malware. This all started with the installation of SourceTree 2.0, so it's gotta be that.

Like # people like this

The commands above seemed to help, but not right away. I thought I had got the spontaneous dialogs to go away, but they do sometimes re-appear.

The problem seemed to start for me when I added a new bitbucket account (academic) and wanted to use two accounts. I have had Source Tree 2.x for a long time and don't recall this headache. I agree the GUI is borked since we have no idea for which account or which operation the credintial manager is asking this information.

Tools > Options > Authentication seemed also to be helpful for me. I removed the Saved passwords that were stored and re-tried a push. That forced the GCM dialog, to which I supplied credentials for the repo that I was pushing to. The push was successful, and I saw also that a new entry in "Saved passwords" was created for that repo.

It seems weird, since I have OAuth for both accounts, and can browse my bitbucket.org repos (some of which are private) with no problem. Why doesn't push (or pull) use that same method to authenticate? 

I have this problem too.

I install Visual Code 1.15.1 and SourceTree 2.1.10.

  • C:\ProgramFiles\shell\Microsoft VS Code\Code.exe
  • C:\Users\ssfang\AppData\Local\SourceTree\app-2.1.10\SourceTree.exe

It always pops up a window too. I use Process Explorer v16.04 to inspect which process is asking me.

Open log `git config --global credential.writelog true`, and search `credential.log` in Everything Version 1.4.1.877 (x86), but the content the log file is empty.

 

BitbucketLogin.pngWhichProcessPopsupBitbuketLogin.png

I followed the above steps, then deleted the git saved passwords in "Authentication".

I received the popup for every single account in "Authentication" (12 items), one more time, no issues since then.

Like Siddharth Sharma likes this

EDIT (20 June 2018): Recent changes to Bitbucket authentication has also meant that you must use your email (NOT your username) when logging in. Currently, logging in with your username is still accepted but seems to cause several issues ranging from this repeated login prompt issue to the "too many login attempts" error when pushing.

I've not seen the issue occur for non-Bitbucket accounts.

---

EDIT (29 Aug 2017): The embedded Git has now been updated, alongside the release of Sourcetree 2.1.11.0. After updating SourceTree, go to Tools > Options > Git and click "Update Embedded Git" to get the latest version (at least 2.14.1).

---

The majority of issues in Git Credential Manager for Windows have been fixed in recent versions. The latest version (1.12.0) released a couple days ago fixed the remaining issues I had with Bitbucket authentication.

The latest Git Credential Manager for Windows is included in the latest Git for Windows. Until Atlassian update their embedded version, you could install Git for Windows 2.14.0 and within SourceTree, click "Use System Git" in Options.

Kris's solution also works if you only want to update Git Credential Manager for Windows specifically, though does require config changes.

I recently updated Git and SourceTree (on Windows) and now I have the same problem with a pop up appearing every 10 minutes or so (even after I entered my password there) when SourceTree is open.

In my case it's the Microsoft account sign in.

I've tried what's suggested in the accepted answer but didn't help. Also tried various other terminal commands I found googling this problem also to no avail yet.

Would appreciate help to fix this, thanks.

edit:

Sorry to rant, but I'm not able to work with this annoying pop up getting in my way again and again.

Went back to SourceTree 1.x until this is properly fixed.

Same error, when working with git repos on TFS and accessing via http protocol. Version 2 of SourceTree seems to try to enforce https. This makes the same login pop up. This didn't happen with 1.9. 

I have the same error. Was doing install/uninstall of all parts. Soooo frustrating time waster

...For those struggling with Git, Bitbucket and Windows authentication, try installing the latest Windows Git Credential Manager: https://github.com/Microsoft/Git-Credential-Manager-for-Windows/releases

I tried this, but now I get 3 popups at a time instead of 2

Like Philipp Sumi likes this

Just to pop in here and bump this thread, it's been marked resolved, but it isn't. I have tried all of the "fixes" in this thread, and the only one that stops the annoying pop ups is going back to 1.9. Something happened recently, because I was just using this same repo on github last week without the issue. I noticed I was using the system git, so I updated that, tried the embedded git, etc. I stopped that service, rebooted a few times, yadayada.  

I normally wouldn't bother commenting but I wanted to let the devs know this is not a fixed issue. 

Thanks for the heads up. I'm also still on 1.9 because of this issue and will continue so until it's fixed completely. 

This all sucks.

Trying to learn to use Sourcetree is so full of ridiculous, yucky, non-sensicle problems and errors.

Life should be easier than this.

This issue was driving me nuts for months.

This is how I fixed it under Windows:

  1. Close all open tabs in SourceTree.
  2. Remove all Accounts under Tools -> Options -> Authentication.
  3. Close SourceTree.
  4. Open Windows own "Credential Manager".
  5. Click "Windows Credentials".
  6. Remove all git or SourceTree related credentials (everything starting with "git:" or something similar to "source-tree-rest:" (don't have this one anymore to look it up)).
  7. Start SourceTree and reenter the correct passwords of your accounts when prompted. This should be the last prompts you will see.
  8. You might have to edit your repository settings to edit and save it's remotes.

Beware, that SourceTree is going to prompt you to login one time for every repository (not account) it knows about (not just open tabs), when it feels like checking for changes for the first time after you completed the above steps and you have to login every time providing your password.

Only after that, SourceTree will finally stay quiet again.

I change all my repositories link to SSH without HTTPS

and it'll never show popup every time after I made password changed.

Now I could also keep my "Tools -> Options -> Authentication" account clean and empty!

1 vote
Deleted user Jun 27, 2017

This is just  a 'me too'.  Updated to 2.1.2.5 and now I can't get rid of the Windows Credentials Manager popup, despite trying all the suggestions above.

This makes ot almost impossible to work.

Anyone know where I can get an older version of SourceTree until there is a fix for this?

 

- Patrick

 

 

last 1.x version (I think) is available here, also other older versions there.

https://blog.sourcetreeapp.com/2016/12/05/sourcetree-for-windows-1-9-9-released/

 

Regarding a temporary 'fix' for this using 2.x version (on Windows), what I did when that annoying pop-up came up, was opening Task Manager, see what processes are running, could spot "Git credential manger.exe" (can't remember exact name), closed SourceTree and renamed that to something like "Git credential manger.old", (so it couldn't run anymore) which 'fixed' the popups for me.

 

I'm back to version 1.x anyway, as I like the layout with the bookmarks sidebar better.

Deleted user Jun 27, 2017

That's great.  Thank you!

 

- Patrick

thanks nofish that worked!!!  I'm really gonna miss typing in my credentials over and over again ;)

Thank you so much nofish. This worked for me. It's such a relief!

This worked until I needed to push something.

See my last comment on how I solved it.

I got here because the window did NOT pop up. Specifically, I kept getting:

fatal: repository 'https://github.com/aprivaterepo/someproject.git/' not found

The fix for me, which DID bring up the SourceTree popup, but thankfully just once:

1. Check your git login information.

git config —global —list

2. In my case, despite putting in my github user name when SourceTree was installed, the information was wrong:

user.name=John Q. Public
user.email=jpublic@users.noreply.github.com

3. Fix this by doing:

git config --global user.name "jpublic"
git config --global user.email "john@corp.example"

4. Then run these commands:

git credential-manager uninstall
# there will be a GUI popup or sudo check
git credential-manager install
# there will be a GUI popup or sudo check, but ONCE:
git clone https://github.com/aprivaterepo/someproject.git

I found this in the Git Credential Manager for Windows. It seems to have solved the issue for me.

Most likely, your environment is not configured correctly. You can verify that your environment is configured correctly by running "git config --list" and looking for credential.helper=manager. If you do not see the line, then you know that Git does not know about the Git Credential Manager. You can configure Git to use the Credential Manager by running "git config credential.helper manager"

Just to say, I just had the same issue here, the popup is so empty of information, since 2 years.... Please guys from ATLASSIAN, do something.

Got resolved with one of the above solutions

Check out Github Desktop. The features are much more limited, but it works and I have not used Sourcetree in over two years. 

Like # people like this

Thanks for sharing man

In my case, I was also having the same annoying pop up piling everytime SourceTree was open.


This was because I was having repos in Sourcetree for which my credentials expired.
I didn't want to just remove those repo as I might get access to them again in the future (I'm contracting for multiple clients and often working again for an older client after a few months, at which point I gain access to their git repos again).


What I did was to just untick "Tools > Options > General > Check default remotes for updates every 10 minutes" and that stopped those popup coming from Sourcetree trying to access repos for which my credentials had expired.


Seems trivial but that took me a little while to find out where those popups where coming from.

In addition to clearing some of the things out as Lau suggests above, I also made sure:

  • I had the latest version of Sourcetree
  • My GitHub account in Tools -> Options -> Authentication was set up for OAuth
  • I upgraded to the latest and used System Git (Tools -> Options -> Git)
  • Upgraded to the latest Git Credential Manager for Windows (this was via an installer I downloaded and double-clicked, very easy)
  • Made sure I checked off the box "Allow Sourcetree to manage my credentials using the Git Credential Manager" (this was important!!) on Tools -> Options -> Git
  • Then when I triggered the GitHub dialog (via pushing a new branch, just an example), I logged in there (this is where it used to fail).
  • I next got the 2 factor auth dialog, and the code was sent to my phone as expected. I was able to enter the code from my phone into this dialog.

It all worked! Finally.

Same issue here. Recently installed SourceTree (3.0.8) on a fresh Windows 10, left it open overnight, and this morning I had 1.364 of those login-popups waiting for me. SourceTree was using an impressive 1.7 GB memory as well.

Twice I've left SourceTree open overnight, and both times my PC has been utterly bogged down by login-boxes the next morning. 

While using SourceTree I get no login-popups. I only have connections to repositories on one single company-local BitBucket host, and I can browse/clone/etc those just fine.

I've just applied the accepted solution - we'll see if that fixes the issue. 

Source Tree is wonderful and free , but the annoying bitbucket login popups doesnt tell what repo it asks login info for , if the login was successful or not 

I'm really tempted to switch to git kraken

You may try the latest Git Credential Manager version linked in the post above yours (thanks Sunil Raman for the heads up). Then in SourceTree you must set to you use System Git to make it effictive I think.

Solution for recent issues (since Q1 2018):

Bo Anderson
 seems to have it solved for me. At some point usernames stopped being reliable, I've just changed across to my email and it's stopped asking (...at least for the last 3 hrs)

I've tried deleting Sourcetree's AppData completely and that sorted it.

Could be an issue with credential caching?

 

Also tried GitKraken (installed alongside Sourcetree). It handles credential management without any issues.

I'll add something here that I think has solved it and others may have mentioned before. Probably the wiping all accounts clean might do the job, but If you're using SSH on some of your repos and HTTPS on others, you'll need to generate a private access key and use that as a password for the HTTPS ones. Also, keep in mind that subrepos may be set up this way, too.

Tried suggested solutions above from Kris, Christopher, Bo, Ryan and Francis, but the issue persists.


Have updated a helper tool to easily toggle the presence of git-credential-manager.exe (rename it, and rename back again when required) as a workaround.

Does anyone know if other GIT clients (GitKraken, SmartGit, Tower, GitUp) are experiencing the same behaviour?

I'm still having this problem, too. I've tried the various suggestions, but haven't found what it is yet. I also tried removing unneeded repos, but the problem still occurs.

Tools > Options > Authentications 

Remove all your repo/password & account/password.

Re-enter it agains and try to pull/commit/push something.

Also I do like to use ssh key to push things, so maybe setting one in your repo settings may help.

The only thing that worked for me was removing the saved password and re-enter it from the settings.

 

Hope it can help some of you.

I was having this issue too, I tried several suggestions on this page to no avail. Turned out to be much simpler, I still had a reference in my SourceTree to an out-of-date repo which had finally been removed. Once I deleted that, the error went away.

I'm on the latest (2.4.8) and since sorting this month's windows 10 updates yesterday I'm now seeing this popup problem too. SourceTree is working fine without me putting any credentials in though.

I have the same error, I'm on v 2.4.8.
Was doing install/uninstall of all parts nothing helps. Soooo frustrating time waster

In my case, it was related to submodules including digest credentials in the URL string.

 

After trying all the suggested solutions, this is what ended up working for me:

  1. Open the base location of your repos in explorer and search for config.
  2. Drag all the file matches to something like sublime.
  3. Look for any basic auth credentials embedded in the URL like: config credentials.pngand delete the credential portion.
  4. After I went thru these and deleted them, I only got one more prompt for credentials.

 

Hops this helps someone else.

-Ryan

Suggest an answer

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

Bug Fix: Sourcetree for Windows authentication error when updating to app password

Hello Sourcetree users!!! With the recent removal of Bitbucket Cloud account passwords for app passwords (please see our Bitbucket Cloud community post for details on why we made this change for se...

60,272 views 127 26
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