Logo Questions Linux Laravel Mysql Ubuntu Git Menu
 

Sourcetree remote: Invalid username or password

Im trying to push to github with sourcetree but get the following error:

git -c diff.mnemonicprefix=false -c core.quotepath=false push -v --tags origin live_version:live_version remote: Invalid username or password. fatal: Authentication failed for 'https://github.com/myname/myrepo/' Pushing to https://github.com/myname/myrepo

Completed with errors, see above.

enter image description here However when I go to

tools > authentication > my github account

And click edit > refresh oauth token enter image description here A page opens and I get:

Authentication Successful

SourceTree has been successfully authenticated. You may now close this page.

It always worked but it suddenly stopped, i do not have two factor authentication. I tried deleting the account and adding it again to no avail. How can I get the connection working again so that I can push my project to github.

Sourcetree version 2.1.8.0

like image 390
Sven van den Boogaart Avatar asked Aug 10 '17 20:08

Sven van den Boogaart


3 Answers

I found the answer here, it is a known bug for version 2.1.8+

The following steps fixed it for me:

Tools > Options > Git > Update Embedded Git

Also pushing with the command line works.

EDIT

Also adding @Latisha's answer:

1. Do the above.
2. Close Sourcetree
3. Delete AppData\Local\Atlassian\SourceTree\passwd 
4. Restart SourceTree
like image 185
Sven van den Boogaart Avatar answered Oct 18 '22 01:10

Sven van den Boogaart


I struggled with this a lot, what solved it for me on my Mac is:

  • Open finder, click Cmd + Shift + g
  • enter ~/Library/
  • Go to Application Support/SourceTree folder
  • delete userName@STAuth-bitbucket.org
  • Open KeyChain Access
  • search for sourctree
  • delete the 'login' item
  • clone your source from bitbucket
  • KeyChain will ask for you bitbucket pass
like image 64
Alon Rosenfeld Avatar answered Oct 18 '22 00:10

Alon Rosenfeld


I faced this issue when i updated Embedded Git. Solved it by removing passwd file. you can find it here. then restart source tree.

AppData\Local\Atlassian\SourceTree\passwd

like image 8
Mohamed Nageh Avatar answered Oct 18 '22 01:10

Mohamed Nageh