SourceTree for Windows authentication issues

SourceTree 2.1.2.5

Windows 10 Home 64-bit

I connect to several Git repositories on GitHub, and several Git and Mercurial repositories on Bitbucket, using SourceTree. Roughly every 10 minutes, SourceTree asks me to enter my username and password for Bitbucket, even though these are already saved in the "Accounts" list. This issue also occurred in SourceTree 1.9.x.

Approximately once every ten minutes, SourceTree displays a "Windows Security" dialog with the title "Git Credential Manager for Windows" and message "Enter your credentials for https://bitbucket.org". If I enter my credentials, the dialog goes away, but comes back roughly 10 minutes later.

If I go to the Accounts list (Tools > Options > Authentication), there are four accounts listed:

1. "bitbucket.org"
Host: bitbucket.org
Username: myusername
Authentication: OAuth
Default account for bitbucket.org: Yes

This account has a Delete button, but nothing happens if I press it

 

2. "github.com"
Host: github.com
Username: Personal Access Token
Authentication: Basic
Default account for github.com: Yes

This account has a Delete button. If I press it, a confirmation dialog appears. If I confirm, the account is removed from the list

 

3. "myusername@"
Host: 
Username: myusername
Authentication: Basic
Default account for : Yes

This account has no Host name. It does have a Delete button. If I press it, a confirmation dialog appears. If I confirm, nothing happens and the account remains in the list.

 

4. "myaccount@bitbucket.org"
Host: bitbucket.org
Username: myusername
Authentication: OAuth
Default account for Bitbucket.org: No

This account has a Delete button, but nothing happens if I press it

 

1 answer

0 votes
Michael Minns Atlassian Team Thursday

Hi

Do you access repositories using multiple accounts, e.g. access GitHUb repositories under different accounts? If so that can cause the behaviour you are seeing. The 'Git Credentials Manager for Windows' which ships with Git and SourceTree relies on only supports a single account for GitHub and hence constantly prompts the user as it attempts to access repositories under different accounts.

You can clean out all the cached credentials using the 'Manage Windows Credentials' option in Windows and deleting all entries prefixed by 'git:'

You can also prevent repeated prompts by disabling SourceTree's automatic checking of remotes in the Tools/Options tab

I use one Github account to access all of my repositories on Github, and one Bitbucket account to access all of my Mercurial and Git repositories on Bitbucket.

Suggest an answer

Log in or Register to answer