Showing results for 
Search instead for 
Did you mean: 
Sign up Log in

It's not the same without you

Join the community to find out what other Atlassian users are discussing, debating and creating.

Atlassian Community Hero Image Collage

Authentication Error - "remote: Invalid username or password"

Source tree asking credentials on every pull/push ,

upon entering credentials its says "Invalid username or password"

even though same credentials works in

Please find below attached snapshot

Tried with new credentials but its not working  in source tree but same working in github

Also tried the solution provided in article :

not worked for me


Let me know if more details needed in this issue.




2 answers

I also encountered the same problem.

I solved it by using Token as the password.
I don't know if your problem is the same, but I hope this can help you.


The website i refer

Token as a password also resolved my issue.

Thank you for support :)

Like antje.myriknas likes this
0 votes
Daniel Eads Atlassian Team Nov 20, 2020

Hi, glad you were able to get it sorted @Jet and for posting the solution!

For a little more context, Github announced earlier this year that they'd be disabling passwords over basic auth - and the actual shutoff date (November 13, 2020) was last week.

There are two ways to change your account setup to work:

  1. Generate a Personal Access Token in Github and then paste that in place of your Github password in Sourcetree - as mentioned by @Jet 
  2. Switch from Basic authentication to OAuth in the Auth type dropdown in Sourcetree for your Github account. Then click the "Connect Account" button to authorize Sourcetree (this should open your browser and just be one click in Github if you're logged in on the web already)

Daniel | Atlassian Support

Which version are you using because the Edit Hosting Account popup in Options->Authentication does NOT have the Connect Account button.
Connecting SourceTree to github is a nightmare. Nothing seems to get rid of the Invalid Username error after I had to update Git/SourceTree

Suggest an answer

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

Tip from the team: configure your repos for hosting goodness!

Supported Platforms macOS Windows We recently introduced support for additional hosting services such as GitHub Enterprise, GitLab (Cloud, Community Edition, Enterprise Edition), and...

4,254 views 4 8
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