Creating a Token

Step-by-step guide to creating a Personal Access Token

Follow this step-by-step guide to create a Personal Access Token for Git authentication.

Creating a Token

Step 1: Go to Settings

Navigate to Settings and click on the "Security" tab.

Step 2: Click "Generate New Token"

In the Personal Access Tokens section, click the "Generate New Token" button.

Step 3: Configure Your Token

Token Name

Give your token a descriptive name so you can identify it later. Examples:

  • "MacBook Pro"
  • "Work Laptop"
  • "VS Code"
  • "CI/CD Pipeline"

Permissions

  • Read - Always enabled. Allows cloning and pulling.
  • Write - Check this to allow pushing commits.

Expiration

Choose when the token should expire:

  • Never expires - For permanent access (use cautiously)
  • 30 days - Good for temporary projects
  • 90 days - Balanced security and convenience
  • 1 year - For long-term personal devices

Step 4: Create and Copy

Click "Create Token". Your new token will be displayed.

Important: Copy your token immediately! For security reasons, you won't be able to see the full token again. If you lose it, you'll need to create a new one.

Storing Your Token Safely

Most operating systems have built-in credential managers that can securely store your token:

  • macOS: Keychain Access (stores automatically when you authenticate)
  • Windows: Windows Credential Manager
  • Linux: GNOME Keyring or KWallet

Git Credential Helper

Configure Git to remember your credentials:

# macOS (uses Keychain)
git config --global credential.helper osxkeychain

# Windows
git config --global credential.helper manager

# Linux (cache for 1 hour)
git config --global credential.helper 'cache --timeout=3600'

Next Steps

Now that you have a token, learn how to use it: