Logo Questions Linux Laravel Mysql Ubuntu Git Menu
 

Sourcetree: Invalid password for Github despite having a valid OAUTH token on Windows

I use Github and Sourcetree on my Windows machine.

I have been into Tools - Options - Authentication and added my Github account. I am 120% sure that my settings are correct.

However, when I try to push anything, I keep getting:

git -c diff.mnemonicprefix=false -c core.quotepath=false push -v --tags origin develop:develop
fatal: HttpRequestException encountered.
   An error occurred while sending the request.

remote: Invalid username or password.
fatal: Authentication failed for 'REPOLINK'

Pushing to REPOLINK
Completed with errors, see above.

Now, I also tried to remove the account in my settings, and then entering e-mail / password manually. Usually it will say OK and ask for my 2FA code on my phone, but for now it just fails and responds with invalid username/password.

Any ideas?

EDIT:

Still a problem. I also tried to decrease my commit size from 15k files to just 1. Doesn't work.

I managed to commit through the console (but I have to fill credentials each time).

So unfortunately this is still unsolved.

like image 218
Lars Holdgaard Avatar asked Jan 28 '23 14:01

Lars Holdgaard


2 Answers

http://www.omniweb.com/wordpress/?p=1291 this person solved it, it works for me.

navigating to C:\Users\USERNAME\AppData\Local\Atlassian\SourceTree and removing (or renaming) the passwd file.

Once this file is removed, restart SourceTree and execute a fetch or something else that requires access to the repo in question. SourceTree will then prompt you for your password, rewriting the cached credentials.

like image 77
Buya Nami Avatar answered Jan 31 '23 20:01

Buya Nami


This is not a very good answer, but I still wanted to show my solution now 1.5 months have gone by.

On 3 computers I've failed to get Sourcetree to work. I'm using Windows on all machines, and above problem keeps happening no matter what I do. I've tried preferences/settings, filling it on prompt...

I doubt it's my account - I use Github OAUTH in many other programs.

The day after this post, I switched to SmartGit. Works much better and no problems, and will not go back.

This is a very bad answer - but if you're ending up here from Google - this is one possible solution.

like image 36
Lars Holdgaard Avatar answered Jan 31 '23 18:01

Lars Holdgaard