13

Atlassian Bitbucket Sourcetree Git Credential Manager keeps prompting me to authenticate.

I have tried several fixes, including the obvious:

  • Entering auth, prompt re-appeared in 15 sec.

  • Deleting all saved passwords. -Didnt work for me, prompt re-appeared in 2-3 min.

  • Updating Git Cred mngr - no effect

  • Updating Sourcetree - no effect

  • Reinstalling services - no effect

  • Deleting App data temp dir - no effect

  • Forcing password update - no effect, actually made it worse.

It keeps prompting me to log in with the wrong username over and over. I'm on Win10-64Bit, using Sourcetree V.3.0.6.

After reading this post on the Atlassian forum, I tried this:

Login with e-mail NOT username see this comment:

Bo Anderson Aug 06, 2017 • edited Jun 20, 2018 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.


(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 updates 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.

This actually made it much worse, and I am prompted to login for every team member I'm teamed with.

BSMP
  • 4,596
  • 8
  • 33
  • 44
DGRFDSGN
  • 575
  • 1
  • 8
  • 20
  • 1
    1.) It seems most likely this has to do with the fact I originally added these repos authenticated * by UN *, for which the support is depreciating. Adding the repos again but authing by email removed the issue. – DGRFDSGN Oct 30 '18 at 08:57
  • 2.) After this the only prompts that kept returning were those owned by a collegue, who also auth-ed by UN instead of e-mail. In the end we decided to step over the issue. Would be interested to know if anyone knows how to fix instead of discard this. – DGRFDSGN Oct 30 '18 at 09:01
  • 3.) Not tested: Would changing the auth login for the owner of the repos, and subsequently re-authing the repo in my machine completely remove the prompts? – DGRFDSGN Oct 30 '18 at 09:01
  • 1
    I would accept the fact that it is working with email. – alex351 Jan 17 '19 at 14:37
  • 1. ) False 2. ) fixed. 3. ) nope, because as described in the answer below, it had nothing to do with Bitbucket, Git, Sourcetreeor Atlassian. Windows was the culprit. – DGRFDSGN Feb 18 '19 at 08:22

5 Answers5

7

Actually fixed this with the help of a colleague. He mentioned i should take a look in the Windows Network password credential manager go to settings -> search for password and open the Network password credential manager, in here i could easily remove the stored Git passwords, finally fixing this problem with bitbucket prompting me to reauth all the repo's, including the ones i didnt own. Jeej! Thanks Mitchel

DGRFDSGN
  • 575
  • 1
  • 8
  • 20
5

Using SourceTree 3.4.8 installed on a clean Windows 11 in a virtual machine, I get the credential helper selection dialog.

I found out that selecting "manager-core" from the list and checking always use was the solution. If the popup comes again, selecting the second option "manager-core" was definitive. I don't know why there are several options with the same name, but the second one was the solution.

Also since I was cloning a repository (with https) from bitbucket, I also had to connect to my account in Tools > Options > Authentication > Add > select HTTPS and OAuth, Refresh OAuth Token.

prossel
  • 111
  • 1
  • 7
  • Thanks for this. I also have a fresh Win 11 install and that prompt baffled me since I didn't get that prompt when I was still in Win 10. – Annie Lagang Apr 07 '22 at 07:26
1

Here is a fix:

From Powershell/Git Bash/Terminal from Source Tree, navigate to

%localappdata%\Atlassian\SourceTree\git_local\mingw32\bin\

or

C:\Users<User Name>\AppData\Local\Atlassian\SourceTree\git_local\mingw32\bin

#run

./git.exe config --edit --system

#opens config in VI editor

#update [credential] helper

[credential] helper = manager

Esc

:wq

Dharman
  • 30,962
  • 25
  • 85
  • 135
Neo
  • 3,546
  • 1
  • 24
  • 31
1

I did the same thing as 2 posts above (open powershell, edit ...), except that for credential helper I put manager-core instead of manager.

With manager I got error : "git: 'credential-manager' is not a git command. See 'git --help'."

Willow
  • 59
  • 1
  • 9
0

I Had the same problem starting on a fresh Win10 VM. Installing Sourcetree 3.4.11 and cloning a repository on Azure DevOps gave me a window called CredentialHelperSelector, as OP describes.

The solution for me was to install Git for Windows separately from https://git-scm.com/download and then telling Sourcetree to use that version instead of the one embedded in Sourcetree.

After installing Git For Windows, go to Sourcetree => Tools => Options => Git => Git version => [click "System"]

kalleguld
  • 371
  • 3
  • 9