Come for the products,
stay for the community

The Atlassian Community can help you and your team get more value out of Atlassian products and practices.

Atlassian Community about banner
Community Members
Community Events
Community Groups

Cannot connect to GitHub from Sourcetree


I'm running Sourcetree 3.1.2 on a Windows 10 computer. I recently changed my GitHub account from using my work email to my personal email. I couldn't get Sourcetree to access GitHub before, and now that I've deleted the old account and added my new one and correct password it still can't access it. I've read through other questions on this type of issue but the responses were from 6 years ago, so likely not relevant to Sourcetree 3.1.2.

In Sourcetree, Tools-->Options-->Authentication seems to have my correct Github information, ID, password, etc. I have it set for Authentication: OAuth and Protocol: SSH. When I try to set this account as default for, it warns me:
"Are you sure you want to set <ID> as the default username for use with '' when no username is included in the DVCS url?" 
I have no clue what a DVCS url is or how to change it. Could this be the problem?

Under the same Tools-->Options-->Authentication screen, under "Git Saved Passwords" I have the correct password set for my github ID, and it says "Authentication: Basic". Could this be "fighting" with the other setting that says "Authentication: OAuth"? I don't know what either of these means or how they differ. Could this be the problem? How would I fix it?

Whenever I try to push my local changes to github I get:
git-c diff.mnemonicprefix=false -c core.quotepath=false --no-optional-locks push -v --tags origin master:master
fatal: HttpRequestException encountered.
An error occurred while sending the request.

remote: Invalid username or password.
fatal: Authentication failed for<URL>

Pushing to <URL>
Completed with errors, see above.

How can I make this work?

P.S. Upgraded to Sourctree 3.4.3. Same issues.

0 answers

Suggest an answer

Log in or Sign up to answer
Community showcase
Published in Sourcetree

Bug Fix: Sourcetree for Windows authentication error when updating to app password

Hello Sourcetree users!!! With the recent removal of Bitbucket Cloud account passwords for app passwords (please see our Bitbucket Cloud community post for details on why we made this change for se...

61,570 views 127 27
Read article

Community Events

Connect with like-minded Atlassian users at free events near you!

Find an event

Connect with like-minded Atlassian users at free events near you!

Unfortunately there are no Community Events near you at the moment.

Host an event

You're one step closer to meeting fellow Atlassian users at your local event. Learn more about Community Events

Events near you