Sourcetree Password Issues
Asked by kegtron:

Hello,

I'm running Sourcetree 3.0.12 in Win7 and have been recently having password issues. Whenever I attempt to pull from from a remote the Atlasian/Bitbucket/Sourcetree password window appears. I'm using basic/https authentication.

Unfortunately it will not accept my password \& username combo, even though it works fine on bitbucket.org and on another mac running Sourcetree.

Any thoughts?

Thanks!


Answers:
author: kegtron
body: Given that the CLI is working, I went to SourceTree -\> Options -\> Git and changed Git Version = System (was Embedded). That worked!

Not sure what the issue is with SourceTree authentication, but I am back in business.

Thanks for your help!


author: minnsey
body: Hi  

There have been a series of issues with the Git Credential Manager recently. Please ensure you are using Git 2.19.2/Git Credential Manager 1.18.3, this seems much improved.

comments: author: kegtron
body: Thanks for the tips... I upgraded both but still having issues on one Windows PC. Sourcetree won't accept my username \& password, even though I know it is valid if I log into Bitbucket directly or use SourceTree on another PC.

Any further thoughts?


author: minnsey
body: Have you tried taking Sourcetree out of the mix and try a clone/pull/fetch/push from the command line? This simplifies the tools chain, though it should still try and use the same git credentials and mechanisms for managing them


author: kegtron
body: Thanks for the suggestion.

git clone https://xxx@bitbucket.org/xxx/xxx.git from the command line works fine using the same credentials that fail in Sourcetree.

Any ideas on next steps? I'm willing to wipe Sourcetree and start with a clean install, but the last time I tried this I don't think it helped.


author: minnsey
body: I would try and ensure command line and Sourcetree are both running the same versions of Git/GCM.  

Assuming they are Sourcetree should just pick up and re-use the credentials you successfully used from the command line.  

Technically Sourcetree doesn't directly use the Git credentials, it asks Git to do something and if it needs them Git asks the GCM for credentials, which either returns stored ones or prompts the user for them. The GCM also attempts to validate the credentials before passing them back to Git.  

You can see the stored credentials in the Windows Credential Manager, prefixed with 'git:'  

<br />


author: kegtron
body: Thanks for the suggestion. Is there a way to determine the version of GCM that Sourcetree is using? I can see the version of git it is using, but no mention of GCM.


author: minnsey
body: hi

if you see an entry like this in the console output in sourcetree

-c credential.helper= -c credential.helper="c:/users/mminns/appdata/local/atlass\~1/source\~1/git_ex\~1/git-cr\~1.exe"

the sourcetree has detected a bad gcm release and is overriding it with its local copy of 1.17.1

if you don't see that sourcetree is relying on git's bundled version. you can detect that by using the terminal and running

\>git credential-manager version

will give you the version the git bundles with it.


author: kegtron
body: > if you see an entry like this in the console output in sourcetree
>
> -c credential.helper= -c credential.helper="c:/users/mminns/appdata/local/atlass\~1/source\~1/git_ex\~1/git-cr\~1.exe"
>
> the sourcetree has detected a bad gcm release and is overriding it with its local copy of 1.17.1

OK - that would appear to be the case for my installation. Any suggestions?


author: minnsey
body: When everything works form the command line, what version of GCM is being used?  

\>git credential-manager version  

?


author: kegtron
body: Git Credential Manager for Windows version 1.18.4


Tags: windows