Search code examples
windowsgitgithubatlassian-sourcetree

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.


Solution

  • 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.