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

GitHub Personal Access Token not working Edited

Mac OS X 10.12.6 / SourceTree 2.7.6

I have a repo at github. I've created a clone on my laptop. On GitHub I created a Personal Access Token and assigned all the scopes.

In SourceTree I open Preferences, click Accounts, click the GitHub account, click Edit and past the PAT into the password field. It appears to accept that.

I then click Push ... and I get this:

git -c diff.mnemonicprefix=false -c core.quotepath=false -c credential.helper=sourcetree push -v --tags origin refs/heads/master:refs/heads/master
Pushing to
remote: Invalid username or password.
fatal: Authentication failed for ''
Completed with errors, see above. 

 Where am I going wrong?

1 answer

0 votes

Hi, did you find any solution to this problem? I'm facing the same issue


Just in case any of you are still looking for an answer, I finally ended up doing the following:

1- Go to "C:\Users\USER\AppData\Local\Atlassian\SourceTree"

2- Delete the file passwd

3- Open Sourcetree and make some action in the repository (push, fetch, pull)

4- Sourcetree is going to request the password and we are going to enter the PAT

5- Enjoy!

Apparently Sourcetree keeps an old version of the password in that file and doesn't replace it when we change it in the Tools -> Options -> Authentication.

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,255 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