Logo Questions Linux Laravel Mysql Ubuntu Git Menu
 

Source Tree: remote: Invalid username or password. fatal: Authentication failed for '**MYURL**'

I tried to clone, pull, or push in source tree and this error comes out.

When I tried to do it in the command line I can do the following code. What seems to be the issue in source tree here?

like image 712
Bon Andre Opina Avatar asked Oct 25 '25 15:10

Bon Andre Opina


2 Answers

Found this answer: Sourcetree remote: Invalid username or password

But is not quite the same solution. Go to

Tools > Options > Git > Embed

Then:

1. Do the above.
2. Close Sourcetree
3. Delete AppData\Local\Atlassian\SourceTree\passwd 
4. Restart SourceTree
5. Hurray!!!

It's fixed for me.. maybe problems with the current version.

like image 176
Bon Andre Opina Avatar answered Oct 28 '25 04:10

Bon Andre Opina


In case of Github + 2FA here is the solution: https://docs.github.com/en/free-pro-team@latest/github/authenticating-to-github/creating-a-personal-access-token

"Once you have a token, you can enter it instead of your password when performing Git operations over HTTPS."

So for Sourcetree mac v4.0.2 -> go to preferences -> Accounts -> Add\Edit -> choose Github -> Auth Type: Basic -> Protocol:HTTPS -> put your token as the password:)

like image 38
DaNLtR Avatar answered Oct 28 '25 06:10

DaNLtR



Donate For Us

If you love us? You can donate to us via Paypal or buy me a coffee so we can maintain and grow! Thank you!