DEV Community

Cover image for Create A PAT (Personal Access Token) For GitHub Repo Access
raddevus
raddevus

Posted on

Create A PAT (Personal Access Token) For GitHub Repo Access

  1. Go to your GitHub account and click your icon in the upper left corner

Image description

2.Choose the Settings menu option.
3.Page will load, now select the very last item on the bottom left (< > Developer Settings)

Image description

4.New page will load (very odd looking really) -- we want to choose "Personal access tokens"
It is likely you'll have to expand that item to see the two items beneath it.

Image description

5.Now, we want to select Tokens(classic)
You'll see something like the following:

Image description
6.We want to generate a new token:

Image description

7.Let's select Generate New token (classic)

You'll probably have to type in your GitHub password at this point to prove you are really you.

Now you'll see a huge list of items (scrolls of the page) for what you want to allow the PAT (personal access token) to be able to do.

You can add a note (to remind you what it is for), an expiration date and for the ability to update your repo code you want it to be like the following:

Image description

8.Scroll all the way tot he bottom of the page and click the [Generate Token] button

Image description

When you do that it will display the "password" one time and never again.

Image description

Copy that password and put it somewhere where only you can get to it.

Now, when you attempt to push changes to GitHub you will use it like the following:

$ git push
Username for ''https://github.com': <type your username> 
Password for 'https://yourUserName@github.com': <type the password from above here>
Enter fullscreen mode Exit fullscreen mode

That's how its really done.

NOTE : Yes, I deleted the PAT from my account so that password will no longer work. 🤓

Top comments (0)