Personal Access Tokens
Personal access tokens (PATs) provide a way to authenticate and authorize programmatic access to Gitpod. You can use PATs as an alternative to using your password for authentication when using the Gitpod CLI or API.
Creating a PAT
To create a personal access token:
- Go to Personal access tokens in the settings
- Click “New Token”
- Enter a description for your token
- Select an expiration period (30, 60, or 90 days)
- Click “Create”
- Copy the generated token immediately. For security reasons, you won’t be able to see it again.
Using a PAT
You can use a personal access token to authenticate with the Gitpod CLI:
Token Permissions
Personal access tokens currently have the same permissions as your user account. They cannot be scoped down to specific actions or resources.
Managing PATs
You can view and manage your personal access tokens at https://app.gitpod.io/projects#/settings/personal-access-tokens.
From this page, you can:
- View existing tokens
- Create new tokens
- Remove/Revoke tokens
Security Considerations
- Treat personal access tokens like passwords. Do not share them or store them in insecure locations.
- Use the shortest expiration period that meets your needs.
- Revoke tokens that are no longer needed.
- Actions performed using a PAT will be logged in the audit logs, referencing the token ID.
Example Use cases for PATs
CI/CD Integration
Use a PAT to authenticate your CI/CD pipeline with Gitpod. This allows your automated workflows to create, manage, or interact with Gitpod environments without requiring manual authentication.
Example:
Scripted Environment Management
Write scripts to manage your Gitpod environments programmatically. This is useful for tasks like bulk operations or scheduled maintenance.
Example:
Third-Party Tool Integration
Integrate Gitpod with third-party development tools or services that need to access your Gitpod account. The PAT allows these tools to authenticate and perform actions on your behalf using the Gitpod CLI.
Example (using a hypothetical code review tool):
Was this page helpful?