Forums

Articles
Create
cancel
Showing results for 
Search instead for 
Did you mean: 

How to clone a repository from Git Hub using SourceTree

jaumesagues
I'm New Here
I'm New Here
Those new to the Atlassian Community have posted less than three times. Give them a warm welcome!
November 11, 2025

I want to download a repository from Git Hub using SourceTree.

I know that I have to generate a token in Git Hub. And I have generated.

Then I select the menu option Tools > Options > Authentication

When I try to add a new account (Git Hub) I enter the following options:

- Hosting Service: Git Hub

- Preferred Protocol: HTTPS.

- Authentication: Personal Access Token ( I have created a Personal Access Token in my Git Hup account)

- I click in "Refresh Personal Access Token". A dialog box is opened where I write my username. I don't know if I have to enter my token or password, but both options fail.

 

Therefore I can't clone my repository.

1 answer

1 vote
Tomislav Tobijas
Community Champion
November 11, 2025

Hi @jaumesagues ,

I've managed to authenticate to GitHub with the following steps:

In GitHub, navigate to:

  1. Profile > Settings
  2. Click on Developer settings
  3. Expand Personal access tokens and click on Tokens (classic) Generate new token Generate new token (classic)
  4. Add note, set scopes and add expiration date > Copy the token

In Sourcetree, navigate to:

  1. Tools > Options
  2. Open Authentication tab > Add account
  3. Hosting Service: GitHub
    Preferred Protocol: HTTPS
    Authentication: Personal Access Token
  4. Click Refresh Personal Access Token
  5. In the dialog, enter GitHub username and PAT (from step #4 generated in GitHub)

2025-11-11_18-15-35.png

Note that I'm using the latest Sourcetree version for WIndows. 

Cheers,
Tobi

Suggest an answer

Log in or Sign up to answer
TAGS
AUG Leaders

Atlassian Community Events