Reputation: 21993
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:
Looked under Tools > Options > Authentication in Sourcetree. Nothing is listed here.
Looked in the Windows Credential Manager in the Control Panel. Nothing related to git/Sourcetree or the server in question is listed here either.
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
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
Reputation: 183
For Mac SourceTree User given steps can help you to resolve to enter password or Token key
Upvotes: 1
Reputation: 381
For MacOS:
Upvotes: 0
Reputation: 768
Upvotes: 1
Reputation: 117
Upvotes: 1
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
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
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
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
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
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
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
Reputation: 131
Found an easier fix: Mac Mojave
Run: git config --global credential.helper osxkeychain
Git pull
git config --global credential.helper store
git config --global credential.helper cache
git pull
, it should ask you for creds onceBingo! Now your password is stored in Git.
PS: Sourcetree is a Wrapper around terminal git, fix the terminal = fix the wrapper.
Upvotes: 13
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
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
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
Reputation: 1613
For Mac given steps can help you...
Upvotes: 37
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
Reputation: 821
Recently I was facing the same issue and this is how I solve it.
Go to:
Tools → Options → Authentication
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
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
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
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