DEV Community

Emmanuel Larbi
Emmanuel Larbi

Posted on

Generating GitHub Personal Access Token (GPAT)

header

GitHub Personal Access Tokens (GPAT) are at times required instead of passwords when working with Git. It should be kept secret from others as they might get access to your repositories if they have the token. You might have encountered the need for GPAT when making a push to your GitHub repo or when creating CodeBuilds in AWS or needed for other reason.

This is simple and let's dive right in to generate our GPAT in less that a minute.

Login to your account and go to Settings

settings

Scroll down and click on Developer Settings.

devSettings

Click on Personal Access Token

pat

Click on Generate new token

generate

Type any name you prefer for the token

name

Select the expiry duration for the token

This defines how long the token will be valid

duration

Select the scopes for the token

Scopes generally means, the permissions that the access token should have. Select them carefully, you might mistakenly delete all or loose access to your repositories.

scope

Finally click on Generate token

generated

Token Preview

Your access token also serves as password and you don't wanna loose it to anyone.

preview

Top comments (0)