Create an Access Token

Creating a PAT

Github allows to create the “classic” tokens and the newer “fine-grained” tokens. For the exercise, we are going to use the classic tokens. Please create a personal access token (PAT), make sure that you enable the scopes write:packages and write:org.

The permissions can also be changed later, by editing the token in the overview.

Make sure that you save the token, as you will not be able to see it again.

Testing the PAT

The easiest way to test your PAT is to create a new (empty) repository remla-test. Try to clone this repository via HTTPS and use your PAT as password.

$ git clone https://github.com/YOURNAME/remla-test.git
Cloning into 'remla-test'...
Username for 'https://github.com': YOURNAME
Password for 'https://YOURNAME@github.com': YOURPAT

Important: use your PAT as password, NOT your actual user password. If you are able to clone the repository, congratulations, your PAT is working successfully!

In practice, it is strongly recommended to register your SSH key and clone Git repositories via SSH. The HTTPS clone should only be use for this test.


Last modified on Jun 27, 2023 at 21:59.