Clone a private GitHub repository without an SSH key using a Personal Access Token

If you need to clone a private GitHub repository without an SSH key you can use a Personal Access Token. This can be useful in a build/deployment pipeline for example where you are using a programmatic GitHub user to clone into a temporary server or container. You can then pass the token and other information via environment variables.

Add comment