4

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?

Bon Andre Opina
  • 2,129
  • 2
  • 15
  • 33

3 Answers3

10

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.

Bon Andre Opina
  • 2,129
  • 2
  • 15
  • 33
3

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:)

DaNLtR
  • 561
  • 5
  • 21
1

Deleting my github account and adding it again solved the issue for me: OSX > Preferences > Account > Remove account > Add account

bkurzius
  • 4,020
  • 2
  • 34
  • 34