1. Home
  2. Docs
  3. Github
  4. Creating a GitHub Personal Access Token (Classic)

Creating a GitHub Personal Access Token (Classic)

A Personal Access Token (PAT) allows you to authenticate to GitHub and perform tasks from scripts, Git clients, or applications without using your password. Follow the steps below to create a Personal Access Token.

Step 1: Sign in to GitHub

  1. Go to GitHub and log in to your account.
  2. In the upper-right corner of any page, click your profile photo, then click Settings.

Step 2: Navigate to Developer Settings

  1. In the left sidebar, click Developer settings.
  2. Click Personal access tokens, then click Tokens (classic).

Step 3: Generate a New Token

  1. Click Generate new token.
  2. Choose Personal Access Token (classic).

Step 4: Configure the Token

  1. Note: Provide a meaningful Note to identify this token (e.g., “My WordPress Integration”).
  2. Expiration: Select the expiration period for the token. For security reasons, it’s recommended to avoid “No expiration.”
  3. Scopes: Select the scopes or permissions you want to grant. Some common scopes include:
    • repo – Full control of private repositories
    • workflow – Update GitHub Actions workflows
    • read:org – Read organization and team membership
      Choose only the permissions required for your tasks.

Step 5: Generate the Token

  1. Scroll down and click Generate token.
  2. GitHub will display the token once. Copy it now and store it securely. You won’t be able to view it again.

Step 6: Use Your Token

  • Use your Personal Access Token instead of a password when authenticating with GitHub in scripts, Git clients, or applications.
  • Keep it secure. Do not share it in public repositories or posts.

Step 7: Revoke or Delete Tokens

  • To revoke a token, go to Settings > Developer settings > Personal access tokens > Tokens (classic).
  • Click Delete or Revoke next to the token you no longer need.