Reputation: 333
I've just reinstalled SourceTree on my new computer and I'm having trouble when trying to push my commits.
If I use the built-in Push button from SourceTree, it brings up a dialog where I enter my username and password but then I get an error: remote invalid username or password
.
The strangest thing is that if I bring the Git console by clicking on the Console button in SourceTree, type git push
then enter the exact same credentials, it works...
I'm assuming SourceTree might be overriding some Git config somehow but I can't find a solution.
I tried deleting all credentials saved by SourceTree, I disallowed SourceTree to modify my Git config in the Tools > General menu but it didn't change anything...
Thanks for your help!
Upvotes: 4
Views: 17571
Reputation: 11
I was able to fix this on SourceTree 3.1.1
by going to Preferences->Account->Edit->Connect Account
.
Upvotes: 0
Reputation: 5909
On Windows you might try to remove OR edit the %LOCALAPPDATA%\Atlassian\SourceTree\passwd
file. Edit means removing only the lines which correspond to the failed credentials
Upvotes: 1
Reputation: 101
Happend to me on SourceTree for Mac.
Username from SourceTree -> Preference -> Accounts
and SourceTree -> Preference -> Network
need to be aligned.
Upvotes: 1
Reputation: 2192
One possible answer to this problem is to update your local version of git or update your embedded version of git. Newer versions of sourcetree do not play nice with older versions of git.
Upvotes: 0
Reputation: 3346
SourceTree -> Preference --> accounts you can delete and add your account again and then try SourceTree -> Preference set Protocol = HTTPS
Upvotes: 2
Reputation: 3195
I had two factor authentication on, so I needed to create new Personal access token in github.com settings page and use it as my password.
Upvotes: 2
Reputation: 1
SourceTree
on Mac then go to SourceTree -> Preference -> Network
.
You'll see your username and GitHub location. Remove it.
Next, when you push
to your repo
, you'll be prompted for username
and password
(to save to chain).
Ideally, there was a password
field here.
Upvotes: 0
Reputation: 683
If you are using SourceTree on Mac then go to SourceTree -> Preference -> Network
You will get the list of username for Remote URLs. You can update username there and next push/pull event that username will start getting reflect.
Upvotes: 16