Skip to content

Use Gitpod without OAuth repo access #10362

@florisvdg

Description

@florisvdg

Is your feature request related to a problem? Please describe

To use Gitpod, I currently have to give Gitpod pull and push access to my GitHub account. This makes sense, because Gitpod needs to clone my private repo, and when I make changes, I should be able to push those changes from within my Gitpod workspace.

This may seem inevitable, but there actually could be a way to lift this requirement: SSH agent forwarding (#6993).

In theory, this could replace the OAuth flows to get repo access, so would remove the need for Gitpod to persist Git secrets for pulling and pushing.

Describe the behaviour you'd like

I'd like for Gitpod's access to GitHub repos to go through my SSH agent first, and only exist for as long my SSH session is active. If I close my SSH session, all access to my GitHub repo is gone.

Example: setting up a new Gitpod workspace

Here's what that could look like using VS Code on my desktop:

  1. Use a command-palette action to launch a new, empty workspace. In the background, this automatically SSH'es into the empty workspace, but using the -A flag.
  2. A VS Code prompt shows up where I can paste in my repo URL (this could be GitHub, but doesn't have to be, that's the beauty of SSH authentication).
  3. Gitpod clones the repo, which it can do because of the -A flag. The authentication goes through my local SSH agent.
  4. I do some coding, a few pulls and pushes, and then close my VS Code window (and therefore also the SSH session to Gitpod).
  5. Gitpod has no access to my Git remotes anymore.

Describe alternatives you've considered

I'm less concerned about read access than write access, so an OAuth flow with read-only access would also suffice. However, the GitHub OAuth scope for repos combines read+write access, so that won't work.

For public repos, this would be an option though. Gitpod could clone from the browser, I'd make some edits, and when I'm ready to push, I SSH into Gitpod with -A, run git push and be done.

Metadata

Metadata

Assignees

No one assigned

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions