Creating a Personal Access Token for GitHub
Ever wanted to work with the GitHub API? So how can you access it and prove Github it’s you who need repo details? PR details?
We can do this by using basic authentication and using an access token. We authenticate our self to GIT API using a personal access token.
This token will act like an ordinary OAuth access token. We use it in places where the password is necessary .
To generate a Personal Access Token
Go to your GitHub account settings by following the steps below:
- Go to https://github.com and log in, now you can see your profile image in the top right corner.
- Click on that and select “Settings” to go to your public profile.
- Go to “Developer Settings”
- Choose “Personal access tokens”
or just visit this link below.
https://github.com/settings/tokens
- Select “Generate New token” button to your right
- Now give the new token a description
- Define the access scope for the token.
- Generate your personal access token.
Make sure to copy your new personal access token now. You won’t be able to see it again!