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?
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?
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
oauth2
also works. –
Langton git clone https://<your-fine-grained-token>@github.com/<ownerusername>/repo.git
–
Cuevas It's the same for fine-grained tokens too.
git clone https://<your-token>@github.com/owner/repo.git
You need to grant Permissions Commit statuses, Contents, Pull requests and Metadata as Read to be able to Clone repositories. And the same Permissions need to the Read and Write to be able to push changes.
I wish the Github Permission names were a bit more intuitive or better organized :D It seems like most people get annoyed with which permission to give and fall back to the classic token.
© 2022 - 2024 — McMap. All rights reserved.