Cannot delete an account on sourcetree

Hi,

In Sourcetree when I go to Tool, Options, Authentication tab and try to delete an account that account is not deleted from the list.

 

 

3 answers

0 vote

Hi Antonis, can you let us know which version of SourceTree and OS are you using? Can you also tell us which account are you trying to delete (Bitbucket Cloud, Bitbucket Server, etc...)?

Best regards!

Ana

Hi Ana,

Using SourceTree v2.1.2.5 in Windows 10 x64 Pro

I am trying to delete a github account.

Thanks

I'm running 2.1.2.5 on Windows 7 Enterprise (x64) and trying to delete two different Bitbucket accounts (both point to the same local instance that no longer exists), with the same issue.

The window refreshes/all panels close, but the account continues to stay.

I am having the same issue with SourceTree 2.1.2.5 on Windows 10 when trying to delete a GHE account.

0 vote

Hi Antonis, James, P.

There is a bug in the current, 2.1.2.5 release when trying to delet some credentials from the 'Saved Passwords' list in Tools/Options/Authentication tab. There is a fix going through Beta testing at the moment.

You can work around this currently by deleting entries from the Windows Vault, using Win-Key typing windows credential manager and deleting the relevant entries that are prefixed by 'git:'

If it is a problem deleting from the 'Accounts' list then that sounds like a different/new issue.

Hi Michael,

 

I did as you said and successfully removed the account from Credentials Manager. I restarted PC account is gone from Credentials Manager but not from Source Tree. I can still see the account in SourceTree

i am tried the same option but if i make other account as default what ever deleted account is coming up again and not able to make the other one as default. 

can you please help me asap

Any update on this one?

Hi Antonis

SourceTree lists two types of accounts/credentials in the Authentication Tab, Accounts and Saved Passwords

Accounts
These are for Bitbucket, Bitbucket Server and Github only and include Git/Hg information and REST information.
Information is stored in %localappdata%/Atlassian/SourceTree/accounts.json and Windows Vault.
Deleting entries from Windows Vault, just deletes the password or OAuth token used by Git/Hg/REST, but does not delete the Account record which holds information about whether to use HTTPS/SSH etc

Saved Passwords
This lists all the 'git:' prefixed entries in Windows Vault where there isn't a matching SourceTree account record.
For example if you use Git to manage a private repository from Visual Studio online, an entry will be createdin Windows Vault and will be lists by SourceTree under Saved Passwords

The bug I mentioned above only applies to Saved Password entries

From what you describe I believe you have deleted the 'secret' associated with the account in SourceTree but not the accounts.json record. You should be able to delete that in SourceTree Authentication Tab.

Hi Sathayakala

When you create an account in SourceTree it is created as a per user account, and indexed as such in Windows Vault.

i.e. git:https://mminns@bitbucket.org

The Git Credentials Manager will only find that entry for URLs containing a user

i.e. https://mminns@bitbucket.org/team/myrepo.git

If you try to clone a urls such as

https://bitbucket.org/team/myrepo.git

The GCM will have to ask for new host specific credentials which willbe stored as

i.e. git:https://bitbucket.org

 

So the 'make default' option will take a user specific set of credentials and copy then to a host specific entry, hence they will then re-appear in the Saved Passwords list

Its wrth being aware that this is a limitation of the Git Credentials Manager for Windows  (GCM) it can only support a single set of credentials for a given host URLs that do not contina a username.

e.g.
https://bitbucket.org/team1/myrepo.git
https://bitbucket.org/team2/myrepo.git

will store credentials under

git:https://bitbucket.org/

for both URLs even if they should be different

If different credentials are required for team1 and for team2 the GCM cannot store both sets, so if you swithc between repos frequently the GCM will constantly be providing the wrong credentials to Git and having to re-prompt the user to enter the right credentials.

User specific URLs do not have this problem, because the credentials are stored per user.

e.g.
https://user1@bitbucket.org/team1/myrepo.git
https://user2@bitbucket.org/team2/myrepo.git

will store credentials under

git:https://user1@bitbucket.org/
git:https://user2@bitbucket.org/

0 vote

Version 2.3.1 has fixes which will help during deletion of some accounts.

I'm on 2.4.8.0 and still not able to delete saved accounts from Tools > Options > Authentication

I also got the problem. Something wrong with new version?

I was able to delete them all from the windows credential manager but later i had to delete it again and it worked. I think maybe "Accounts" delete but "Reset Saved Passwords" don't. I haven't confirmed this though

Suggest an answer

Log in or Join to answer
Community showcase
Brian Ganninger
Published Jan 23, 2018 in Sourcetree

Tip from the team: workflow and keyboard shortcuts

Supported Platforms macOS Sourcetree has a lot to offer and, like many developer tools, finding and using it all can be a challenge, especially for a new user. Everyone might not love ...

274 views 0 3
Read article

Atlassian User Groups

Connect with like-minded Atlassian users at free events near you!

Find a group

Connect with like-minded Atlassian users at free events near you!

Find my local user group

Unfortunately there are no AUG chapters near you at the moment.

Start an AUG

You're one step closer to meeting fellow Atlassian users at your local meet up. Learn more about AUGs

Groups near you
Atlassian Team Tour

Join us on the Team Tour

We're bringing product updates and pro tips on teamwork to ten cities around the world.

Save your spot