GitLab token rotation with Linear
This procedure rotates a GitLab personal access token and reconnects the Linear integration, including updated webhooks.
Rotating a GitLab personal access token
When a GitLab personal access token (PAT) expires or needs rotation, use the glab CLI:
glab token rotate --user @me "TokenName" --duration 365d
--user @metargets your personal access tokens--durationaccepts days (365d), weeks (52w), or hours (8760h)- Maximum duration is 365 days
- Alternative:
--expires-at 2027-06-18for an exact date
Updating the Linear integration
Linear doesn’t have a “update token” button. To use the new token:
- Go to Linear Settings > Features > Integrations > GitLab
- Click Disable
- Click Enable to re-launch the setup pop-up
- Enter the new token
- Click Connect
Important: Disabling and re-enabling generates a new webhook URL and secret. You must update webhook settings in all connected GitLab projects/groups:
- Go to GitLab Project/Group Settings > Webhooks
- Update the webhook URL and secret from Linear
- Verify triggers:
Push events,Comments,Merge request events,Pipeline events