Cannot delete an account on sourcetree

pantonis June 27, 2017

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.

 

 

4 answers

2 votes
minnsey
Atlassian Team
Atlassian Team members are employees working across the company in a wide variety of roles.
July 18, 2017

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.

pantonis July 20, 2017

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

Like dprigh likes this
sathyakala gunasekaran July 20, 2017

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

pantonis July 27, 2017

Any update on this one?

minnsey
Atlassian Team
Atlassian Team members are employees working across the company in a wide variety of roles.
August 10, 2017

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.

minnsey
Atlassian Team
Atlassian Team members are employees working across the company in a wide variety of roles.
August 10, 2017

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/

Artyom August 27, 2018

Removed with solution by @minnsey. SourceTree: 2.6.10

0 votes
Deleted user February 26, 2018

Sourcetree Version 2.4.8.0  (Feb 2018)  Win 10 (latest build), 64bit 

Still having massive issue with Authentication - Unable to delete any account that uses REST and having to resort to Windows Vault for manual deletion.   

Completely unable to use GitHub personal tokens to work (https or ssh) - with or without 2FA turned on.  Will not work on either of my Win 10 machines.  (GitHub 2FA tokens working fine on my colleagues Mac's and I'm following the exact same process.) 

I'm very familiar with 2FA, tokens, Oauth, and using public/private keys across a myriad of systems and OS's.  So whilst I'm allowing for an element of pebcak, I suspect it's not all me.

So far have wasted 4 hours attempting to get 2FA to work with Github (mandated by my client) 

(Basic authentication works fine)

 

minnsey
Atlassian Team
Atlassian Team members are employees working across the company in a wide variety of roles.
March 6, 2018

Hi

Can you check that you are using a version of Git >= 2.16? GitHub removed TLS 1.1 and 1.1 support recently and the Git Credential Manager that ships with Git for Windows had to be updated to v1.14.0 to cope. This ships with Git 2.16 or higher

https://githubengineering.com/crypto-removal-notice/

Deleted user March 6, 2018

@minnsey

Sourcetree 2.4.8.0

Embedded Git on one of my Win10 was 2.11

Using 'Update Embedded Git' button will only update it to PortableGit-2.15.1.2

The download path is;
https://downloads.atlassian.com/software/sourcetree/windows/PortableGit-2.15.1.2

My other win10 was already Embedded Git 2.15.1 and will not update any further.


My alternative is to use a system git - which last time I used a system Git with Sourcetree it caused me no end of grief and I had to uninstall everything and start again.

(Footnote:  I know. Windows is a complete PIA to develop for)

minnsey
Atlassian Team
Atlassian Team members are employees working across the company in a wide variety of roles.
March 20, 2018

Hi

The next release will update the embedded version to 2.16+ but everything should work OK with a System Git setting? What errors were you seeing?

Nouish March 31, 2018

Just had this happen. Updating to latest Git (not embedded; 2.16.2) finally resolved it.

I did encounter this error before updating Git, however:

fgaDETc

 

Using Sourcetree 2.4.8.0 with Git 2.13 (rev unknown) when that happened.

0 votes
minnsey
Atlassian Team
Atlassian Team members are employees working across the company in a wide variety of roles.
September 11, 2017

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

Ryan Burnham February 21, 2018

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

Tobias Wentzlaff February 22, 2018

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

Ryan Burnham February 22, 2018

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

minnsey
Atlassian Team
Atlassian Team members are employees working across the company in a wide variety of roles.
March 6, 2018

We'll take another look.

0 votes
Ana Retamal
Atlassian Team
Atlassian Team members are employees working across the company in a wide variety of roles.
June 29, 2017

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

pantonis June 29, 2017

Hi Ana,

Using SourceTree v2.1.2.5 in Windows 10 x64 Pro

I am trying to delete a github account.

Thanks

James Skemp June 30, 2017

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.

cowlinator July 6, 2017

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

Balint Nagy May 2, 2018

I'm having the same issue on SourceTree v2.5.5.0.

I had to change my password on GitHub, now SourceTree cant access it (no Pull or Push).

I tried deleting the passwords, deleting the cached authentication entries, editing them - but it all fails.

I followed this https://confluence.atlassian.com/sourcetreekb/how-to-wipe-sourcetree-preferences-412484640.html

uninstalled and reinstalled SourceTree, dragged local repos into SourceTree - now I'm OK.

Suggest an answer

Log in or Sign up to answer
TAGS
AUG Leaders

Atlassian Community Events