Quickly Generate a GitHub Personal Access Token
Need a GitHub personal access token fast? Follow the steps below to generate one in under a minute.
Quick Links
Step-by-Step
- Open your profile menu (top-right) and click Settings.
- Click Developer Settings from the left menu.
- Click on “Personal Access Tokens” from the left menu.
- Choose Tokens (classic) or Fine-grained tokens
- Click Generate new token
- Add a name, expiration, and required permissions.
- Click Generate token
- Copy and store it securely, then enter it into your app
Your app will generally validate the token immediately and let you know if permissions aren’t correct.
Visual Walkthrough
Having trouble finding the settings? Here’s a visual walk-through.
Finding the Profile Menu and Settings
Your profile is on the top-right, with a Settings menu in the dropdown.
Finding the Developer Settings
When in Profile Settings, in the left sidebar, you’ll see an option for Developer Settings. This is demonstrated in the video below.
Token Types
GitHub provides two types of personal access tokens:
- Fine-grained tokens (recommended)
Limit access to specific repositories and permissions. - Classic tokens
Provide broader access and are typically used for legacy integrations.
Expiration Types
Some tokens can be long-lived, but GitHub increasingly encourages setting an expiration date for security reasons.
Depending on your setup, non-expiring tokens may not be available.
Long-lived Tokens (non-Expiring)
If you must create a long-lived token:
- Limit access to only the required repositories
- Avoid granting unnecessary permissions
Further Reading
- Managing Your Personal Access Tokens
- Setting Personal Access Token Permissions for Your Organization
Once you’ve generated your GitHub personal access token, you can use it to power integrations and displays. For example, our free plugin WP Plugin Info Card uses tokens to feature GitHub repositories directly on your WordPress site.
Like This Resource? Get them delivered to your Inbox Automatically.
There's more where that came from. Enter your email, and I'll send you more like it.
