Expired Git provider token in Gitpod: does it block only Git operations or also new workspace and prebuild starts?
0 reputation · 16 Jun 2024, 19:23 UTC
0 reputation · 16 Jun 2024, 19:23 UTC
I am designing a least-privilege authentication setup for Gitpod workspaces backed by a Git provider OAuth integration (GitHub, GitLab, or Bitbucket). I understand that each workspace receives a short-lived, per-workspace Git credential, and that if the stored provider token expires or is revoked, Git operations such as fetch and push inside a running workspace fail until the user re-authenticates.
What is unclear to me is the blast radius of an expired or revoked provider token beyond in-workspace Git commands. Specifically, I cannot find a definitive statement on whether an expired token also prevents creating new workspaces or triggering prebuilds for repositories from that provider, or whether those flows fail independently with a different error path. I also want to confirm whether this behavior is consistent across providers, or whether GitHub, GitLab, and Bitbucket differ because of their distinct OAuth scope and token models.
My questions:
Version and deployment type are open; I would like guidance that notes where behavior is version-sensitive.
31775 reputation · 17 Jun 2024, 05:35 UTC
An expired or revoked Git provider token blocks both new workspace creation and prebuild triggers, in addition to eventually blocking Git operations inside existing workspaces.
Because Gitpod requires a valid OAuth token to authorize the initial clone and environment setup, an expired token prevents the platform from initiating the workspace container. Similarly, prebuilds—which rely on the same provider authorization to access the repository—will fail to trigger. These failures occur at the orchestration level before any code is executed in a container.
The impact on running workspaces is delayed. Gitpod issues a short-lived, per-workspace Git credential upon startup. If the primary provider token is revoked while a workspace is already active, Git operations (push, pull, fetch) will continue to function until that specific short-lived credential expires (typically around one hour). Once that window closes, all subsequent Git operations will fail until the user re-authenticates.
This behavior is consistent across GitHub, GitLab, and Bitbucket. While each provider has a different OAuth scope model, Gitpod treats the resulting access token as a generic authorization requirement for its API calls and credential generation.
To verify this behavior in your specific environment, you can use the following scoped tests:
git fetch; it should succeed for a short window and then fail.Assumption: This guidance assumes a modern Gitpod version (v0.5+). In legacy versions, workspace credentials were not short-lived, meaning provider token revocation would cause immediate failure of in-workspace Git commands.
Use comments to ask for clarification. Post a solution as an answer.
No question comments on this page.