Clone Github Repo Using PAT (Personal Access Token)

TLDR; generate PAT on your github account, and clone using
git clone https://<pat>@github.com/<user>/<repo>.git

  1. Go to Settings (https://github.com/settings/profile)

2. Go to Developer Settings (https://github.com/settings/apps)

3. Click Personal access tokens, and Generate new token (https://github.com/settings/tokens)

4. Input Note, and check repo

If repo is unchecked, you will not be able to clone a private repository

5. Scroll down to Generate token

6. Copy the generated PAT

7. Run the command
git clone https://ghp_jqJoMkG21OObgnn2vWbQmcYexbMGg91gglKz@github.com/<user>/<repo>.git

--

--