How do you use personal access token instead of password with sourcetree

Had the same problem.

With SourceTree, do the following:

  1. Generate your Personal access tokens in Github account setting.
  2. Double click a repository in SourceTree, click Setting icon in the top right of the popup window.
  3. Click Remotes in the menu tab. You will see the remote URL of this repository, which should be like this https://github.com/username/repo.git .
  4. Click Edit and change it to https://<your_token>@github.com/username/repo.git .

DONE.

3 Likes