Home › How To's › How to Create a Non-Expiring GitHub Personal Access Token

How to Create a Non-Expiring GitHub Personal Access Token

GitHub Personal Access Token Prompt
GitHub Personal Access Token Prompt

Summary

To create a non-expiring personal access token, create a Classic Token and set its expiration to ‘No Expiration’. Ensure that you save the personal token in a secure location where you can retrieve it later.

Introduction

You may have been asked to supply a GitHub personal access token to increase the rate limit for GitHub API requests or to access repository information.

Here’s how to obtain your GitHub Personal Access Token.

Step 1: Find Your Profile and the GitHub Dashboard

GitHub Dashboard via the GitHub Homepage
GitHub Dashboard via the GitHub Homepage

Log in to GitHub as usual, and go to the GitHub Dashboard at https://github.com.

Step 2: Find the Profile Settings

Hover over your profile and find the Settings menu item. This is demonstrated in the video below.

Find Profile Settings in GitHub

You can also try navigating to: https://github.com/settings/profile

Step 3: Find the Developer Settings

In the left sidebar, you’ll see an option for Developer Settings. This is demonstrated in the video below.

Finding the Developer Settings for a GitHub Token

You can also try navigating to: https://github.com/settings/apps

Step 4: Create a Personal Access Token

In the left sidebar, you’ll see three options: GitHub Apps, OAuth Apps, and Personal access tokens. Click on “Personal access tokens.”

You can also try navigating to: https://github.com/settings/tokens

Click on Tokens (Classic) to Create a Key That Doesn’t Expire

To create a non-expiring access token, click on “Tokens (classic).” You’ll be taken to a screen to create a new token.

Personal Access Token Screen (Classic)
Personal Access Token Screen (Classic)

Click on “Generate new token.” Ensure that you create a Classic Token with no expiration.

Generating a New Token

Unless directed, you don’t need to select any scopes or permissions to create the token. Save the token in a password manager and enter it into your program as instructed.

Conclusion

In this brief “How To”, I demonstrate how to create a new, non-expiring personal access token. Please let me know if you have any questions.

Ask a Question or Leave Feedback

Your email address will not be published. Required fields are marked *