13

With classical Github tokens you can clone a repo like this:

git clone https://<your-token>@github.com/owner/repo.git

This doesn't work with the new fine-grained tokens.

How do you clone a GitHub repo with the new fine-grained tokens?

Floris Devreese
  • 3,127
  • 2
  • 21
  • 31

1 Answers1

23

When using fine-grained tokens you have to prefix the token with oauth2: user.
like this:

git clone https://oauth2:<your-fine-grained-token>@github.com/owner/repo.git

*credits to Andy's comment here

Floris Devreese
  • 3,127
  • 2
  • 21
  • 31