SourceTree keeps asking for Github password

If you are using two-factor authentication with GitHub you will need to create a personal access token and use it with SourceTree:

To work with GitHub's two-factor authentication in SourceTree you can simply use your access token instead of your password. The steps to do this are as follows:

  1. Go to your Personal Access Tokens settings in GitHub.
  2. Click on the Generate new token button.
  3. Name the token something descriptive.
  4. Select which scopes you wish to grant this token.
  5. Click the Generate token button.
  6. Copy the token and use it as a password in your hosted repositories.

You can find more information about this on GitHub's help here.

Mac Users: If your SourceTree keeps on asking for the password, go to the Terminal and type this:

git config --global credential.helper osxkeychain

I am using a SSH key, but SourceTree was asking me a password every time.

Found on the community of Atlassian, this solution worked for me:

  1. Open the terminal, get into your project directory
  2. Type git config credential.helper store
  3. Type git pull
  4. Input username/password (if asked)

Voilà !


Follow to @Chris answer in case you've enabled 2FA, to use Personal Access Token in SourceTree, you need to add your acc with this token in SourceTree > Preferences with following information:

  • Auth Type: Basic
  • Username: {your-github-account}
  • Password: {your-personal-access-token}
  • Protocol: HTTPS

After that, you are able to clone your Github repo.

enter image description here


A solution worked for me given by Andrew Magill, Copied from Source : link

The problem is that SourceTree's embedded Git client comes with git-credential-manager v1.12, which no longer works with Github since they disabled TLS 1.1 on their site. You need to get git-credential-manager v1.14. Easiest way to do that is to install a current copy of the Git client separately, and then switch SourceTree over to use that ("system git") instead of its embedded client. Alternatively, you can update git-credential-manager in your embedded client by replacing its files with the newest version from Microsoft.


I had a similar thing after an update; I tried re-adding my bitbucket credentials, changing the protocols, etc. with no luck, until...

  1. I opened my keychain and searched for bitbucket (probably the same for github, just search for github instead) under the Passwords category.

  2. I found that I had multiple Access Keys for my user, so I closed my repository, deleted all the keys of "application password" Kind, opened the SourceTree preferences > Accounts > removed my account and re-added it (login as usual - I used Basic with HTTPS).

  3. Keychain asks for permission to save the password, which I said yes and now I only see one key of the kind "application password".

I opened my repository from the repo browser and hey presto, no more password popups!

This bugged me for a whole week! If this helped you, you can do a little dance with me now :)