thefliptrickster
thefliptrickster

Reputation: 323

How to make a basic connection to Github in Sourcetree

When trying to clone a repo from Github in SourceTree, it keeps telling me the repo URL is invalid, when I've copy/pasted it directly from the repo's Github page.

I'm using HTTPS and trying to make a Basic connection in SourceTree

Github connection attempt:

Github connection attempt

I'm sure I'm entering my username and github password correctly, but it's saying it cannot connect?

I would expect my Github username and password to make the connection work, but it appears not to.

Upvotes: 7

Views: 16845

Answers (2)

VonC
VonC

Reputation: 1323065

One reason why SourceTree does accept your GitHub password, and is "looking for a PAT -- Personal Access Token --, is that, as mentioned in "Creating a personal access token for the command line":

A personal access token is required to authenticate to GitHub when you're using two-factor authentication.

If you have 2FA, you need a PAT as a password.

Upvotes: 4

thefliptrickster
thefliptrickster

Reputation: 323

So the issue was I was giving it my actual Github account password, and what it is looking for is a Personal Access Token created for my account.

To do this I went to my github account page Settings > Developer Settings > Personal access tokens and created a new token. Using that token in the 'password' section of the SourceTree account connection panel I was able to connect!

Upvotes: 5

Related Questions