Eelke
Eelke

Reputation: 21993

Sourcetree change password of existing account

I use Sourcetree to pull and push to a server over ssh. Sourcetree has remembered the password but the password has changed. I cannot find how to inform Sourcetree of the new password.

Based on Google searches, I have tried the following things:

I am using Sourcetree 2.0.18.1

Update

I have been circumventing this problem by using key based authentication through pageant. In the meantime, there have also been updates to Sourcetree and I'm currently using 2.3.1 for which editing/removing the %LOCALAPPDATA%\Atlassian\SourceTree\passwd file works (2.0.18 didn't have that file).

Upvotes: 138

Views: 234262

Answers (22)

BlackLotus
BlackLotus

Reputation: 440

For Mac user

You can go to Keychain Access -> Search for github.com Access Key for your_username -> Double click your username -> Show password -> And then you can freely edit it. Sometime it will ask you to enter your password again.

Upvotes: 8

Yogesh Rathore
Yogesh Rathore

Reputation: 183

For Mac SourceTree User given steps can help you to resolve to enter password or Token key

  1. Got to the folder ~/Library/Application Support/SourceTree
  2. Delete the file [email protected]
  3. Delete the file [email protected]
  4. Restart Sourcetree
  5. Try to fetch, password filed appear, give your new password or Token key
  6. Done

Upvotes: 1

Oranutachi
Oranutachi

Reputation: 381

For MacOS:

  1. Got to the folder ~/Library/Application Support/SourceTree
  2. Delete the file {Username}@STAuth-bitbucket.org
  3. Restart Sourcetree
  4. Try to fetch, password field will appear, enter your new password (also you can run "git fetch" command in terminal and enter a new password)

Upvotes: 0

Andrey Molochko
Andrey Molochko

Reputation: 768

  1. SourseTree -> Preferences -> Advanced.
  2. In this window remove default user.
  3. Try to do fetch/pull/push.
  4. In new window SourceTree request email and password from your account. In password you have to enter SSH key.
  5. Done!

Upvotes: 1

Michael
Michael

Reputation: 117

  1. Go to repository overview
  2. Right-click the repository and click Custom Action
  3. Click 'Account' tab
  4. Edit your password

Upvotes: 1

Naresh
Naresh

Reputation: 1

For Windows - Delete the passwd file located in below path

\AppData\Local\Atlassian\SourceTree

Then authenticate again using Tools -> Options -> Authentication (OAuth or Basic)

Try a push or pull, it will ask for Credentials and save it again, it will create a new passwd file

Upvotes: 0

Alvaro F.
Alvaro F.

Reputation: 11

In case of Azure-Devops authentication, only removing the cache file from ~\AppData\Local\Atlassian\SourceTree worked for me

I tried to set up the credentials several times but didn't authenticate correctly. So I logged out, removed cache folder, then logge in and it worked.

Upvotes: 1

Jérôme Gillard
Jérôme Gillard

Reputation: 2127

I had to manually clear stored credentials by emptying those files on my Windows:

%LocalAppData%\Atlassian\SourceTree\userhost
%LocalAppData%\Atlassian\SourceTree\passwd

Then restart SourceTree.

Upvotes: 179

rama rangeswara reddy
rama rangeswara reddy

Reputation: 49

I have one solution ,

I faced the same problem ,Normally I was used the SourceTreeClient for pushing and pull, commit the code to GitLab account ,one day I reset the password for my GITLAB account ,now i am facing with error,that --->ERROR:

remote: HTTP Basic : Access denied fatal: Authentication failed for 'https:gitlab...'

solution : For windows OS, windows tab -> credential Manager -> windows Credentials -> Generic credentials -> select @.git-lab.com ( related to that source tree account) -> click on remove ->ok

after doing this work while we executing git pull it will ask for the username and password ,then it will execute correctly without showing error,,

Upvotes: 2

Shevach
Shevach

Reputation: 737

As of version 4.1.0 the problem that I had is correct credentials but as I have deleted ~/.ssh/known_hosts file then the GitHub fingerprint couldn't be verified, so Source Tree would just hang.

Solved by doing a manual fetch in terminal and accepting GitHub's public RSA key

Upvotes: 0

Diego Cotini
Diego Cotini

Reputation: 1069

I used to delete this file as well but in my current version this options is not available anymore.

After searching and trying few things one that worked for me was:

Opened the Windows Credential Manager, then clicked on Windows Credentials option, looked for my git: entry credential and clicking on edit I could update my password.

Upvotes: 0

Roy Kim
Roy Kim

Reputation: 741

Go to Preferences ▶︎ Advanced menu and delete the hostname that you want to reset.

After this, you can re-enter your username and password whenever needed (such as pulling from git).

Upvotes: 60

Amit Ratwani
Amit Ratwani

Reputation: 131

Found an easier fix: Mac Mojave

  1. Go to your repo folder in terminal
  2. Run: git config --global credential.helper osxkeychain
  3. Git pull
  4. Enter your username and password, then git will pull
  5. Run: git config --global credential.helper store
  6. Run: git config --global credential.helper cache
  7. Do a git pull, it should ask you for creds once

Bingo! Now your password is stored in Git.

PS: Sourcetree is a Wrapper around terminal git, fix the terminal = fix the wrapper.

Upvotes: 13

Dy4
Dy4

Reputation: 727

For mac, delete bitbucket / git credentials on key-chain item and recreate new item on keychain with name, account and new password details for bit bucket/ git and save keychain item. While reopening source tree it grants access with updated details.

Editing directly on keychain dint work, deleting and recreating them worked.

Upvotes: 0

Nalmar Sudheerreddy
Nalmar Sudheerreddy

Reputation: 11

For me (MAC) goto SourceTree -> preferences. A popup will open. goto Accounts tab, double click on account u want to update password and update password.

Upvotes: 1

rakesh kumar
rakesh kumar

Reputation: 97

For macOS, go to keychain -> Login. Delete all the keychains stored for bitbucket/github, quit sourcetree, open it again and try to pull the code. It will ask for the new password and it will also store the keychain for updated password in mac keychain.

Upvotes: 2

emraz
emraz

Reputation: 1613

For Mac given steps can help you...

  1. Got to the folder ~/Library/Application Support/SourceTree
  2. Delete the file {Username}@STAuth-bitbucket.org
  3. Restart Sourcetree
  4. Try to fetch, password filed appear, give your new password
  5. Also can run "git fetch" command in terminal and need to type password
  6. Done

Upvotes: 37

Nikola Stankov
Nikola Stankov

Reputation: 131

I had the same issue and that work for me was:

Go to Windows Credentials Manager and edit my Git credentials.

Upvotes: 8

Avinash Raj
Avinash Raj

Reputation: 821

Recently I was facing the same issue and this is how I solve it.

Go to: ToolsOptionsAuthentication
You can see your account there.
Clicking on your account it would give you an edit option. From there you can refresh your password.

Current version is 2.7.1

Upvotes: 47

Amrita Basu
Amrita Basu

Reputation: 51

Remove the cache folder from ~\AppData\Local\Atlassian\SourceTree

After that try to pull from your existing repository. It will then ask you for new username and password. Put your changed password. You are done.

You can check your settings from Source Tree after that. Tools>Options> Authentication.

Upvotes: 3

Radu Simionescu
Radu Simionescu

Reputation: 4676

On OS X, if using a company hosted git repo, and you changed the password due to company password expiration policy, you need to go to keychain access, search for sourcetree in there. An application password will apear for SourceTree. Delete it. Next time you try to fetch/push/whatever on your repo, it will ask for pass and will create a new entry in keychain.

Upvotes: 128

Ben Butzer
Ben Butzer

Reputation: 1005

Check to see if you are even using the Wincred credential helper git config --global -l This will set it git config --global credential.helper wincred also --system and/or --local

Upvotes: 0

Related Questions