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.

 

 

4 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.

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.

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

We'll take another look.

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)

 

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/

@Michael Minns

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)

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?

Erik Eide I'm New Here Mar 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.

Suggest an answer

Log in or Sign up to answer
How to earn badges on the Atlassian Community

How to earn badges on the Atlassian Community

Badges are a great way to show off community activity, whether you’re a newbie or a Champion.

Learn more
Community showcase
Published May 30, 2018 in Sourcetree

Tip from the team: configuring Git or Mercurial in Sourcetree

Supported Platforms macOS Windows To make using Sourcetree as simple yet powerful as possible we embed (bundle) dependencies such as Git, Git LFS, and Mercurial. We strive to keep these...

570 views 1 2
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