*Memos:
- My post explains how to clone a private repository with PAT(Personal Access Token) from Github.
- My post explains useful IPython magic commands.
With FGPAT(Fine-Grained Personal Access Token), you can clone a private repository from your account and you can also clone a private repository from your organization if you're its owner or member:
*Memos:
- You need to generate a FGPAT and add it to the command below. *Organization doesn't have FGPAT or PAT generator.
- A FGPAT can select permissions more precisely(finely) than PAT.
-
fgpat
is FGPAT. -
pat
is PAT. -
usr
is username. -
org
is organization. -
repo
is repository.
git clone https://<fgpat or pat>@github.com/<usr or org>/<repo>.git
<How to generate a FGPAT from your account>
Press Generate new token from Personal access tokens/Fine-grained tokens:
Fill Token name, then select All repositories in Repository access. *You can select Only select repositories to only select the repositories you want but don't select Public Repositories (read-only) otherwise you cannot clone a private repository:
Set Access: Read and write for Contents to clone a private repository and to do some basic operations such as
add
,commit
,push
etc.
This is the command with the FGPAT generated above:
git clone https://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@github.com/<usr or org>/<repo>.git
Top comments (0)