Atlassian Bitbucket Sourcetree Git Credential Manager prompt
Asked Answered
L

7

15

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.

Lodge answered 11/10, 2018 at 9:8 Comment(5)
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.Lodge
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.Lodge
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?Lodge
I would accept the fact that it is working with email.Menides
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.Lodge
L
9

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

Lodge answered 18/2, 2019 at 8:20 Comment(1)
THIS IS THE ONLY THING THAT ACTUALLY WORKED (IN 2023) - THANK YOU! To get to this screen easily on Windows 10, either search for network passwords in start menu, or RUN: control keymgr.dll ... then delete any git credentials stored here, restart SourceTree, and when you are prompted to login on your next push/pull, put in your password. It will finally remember it!Bespread
F
7

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.

Fic answered 22/3, 2022 at 20:54 Comment(1)
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.Fitzhugh
B
3

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"]

Breland answered 25/2, 2023 at 21:28 Comment(0)
P
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

Poorhouse answered 21/4, 2021 at 13:26 Comment(0)
H
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'."

Herodias answered 13/3, 2023 at 19:25 Comment(0)
F
0

After trying a lot of things like - updated source tree, applied authentication multiple times, even close and open source tree, to fix the issue, what eventually worked was to select manager-core when it was asking for credentialhelperSelector.

Flagship answered 22/1 at 8:41 Comment(0)
R
0

I've just hit this problem. Windows 11. Sourcetree 3.4.17. I got the following CredentialHelperSelector pop up. It offered these options:

  1. no helper
  2. wincred
  3. wincred
  4. manager

option 4 didn't work. option 3 did. happy days. no idea why. CredentialHelperSelector options

Ribbon answered 19/3 at 16:54 Comment(0)

© 2022 - 2024 — McMap. All rights reserved.