Thanks to visit codestin.com
Credit goes to github.com

Skip to content

docs: no documentation on how Coder uses GIT_ASKPASS for OAuth connections #17375

New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Closed
ericpaulsen opened this issue Apr 14, 2025 · 0 comments · Fixed by #17457
Closed

docs: no documentation on how Coder uses GIT_ASKPASS for OAuth connections #17375

ericpaulsen opened this issue Apr 14, 2025 · 0 comments · Fixed by #17457
Labels
docs Area: coder.com/docs

Comments

@ericpaulsen
Copy link
Member

a prospect recently inquired about how our OAuth integration with GitLab works, and I realized we do not have any information on GIT_ASKPASS is used to retreive the OAuth token for users when they run git operations.

here is my response, which is a good starting point for building out the docs:

When a user steps through the "Login with GitLab" flow, Coder will receive an OAuth token that it stores in the PostgreSQL database (encryption available) on behalf of the user. This OAuth token is then injected by Coder into the user's git operations over HTTPS (and not SSH). This token stores the git config you reference above (email, name, etc.)
We use the GIT_ASKPASS environment variable to query the database & inject the token into the git push commands. This is automatically set across all of the user's workspaces by Coder when the user performs the "Login with GitLab" flow. The steps are:

  1. Execute the Login with GitLab flow
  2. GIT_ASKPASS is set to /tmp/coder.<random-string>/coder in all of user's workspaces
  3. Run git clone / pull / push over HTTPS

To reiterate, this GIT_ASKPASS feature does not execute when git operations are performed over SSH. The SSH key Coder provides for each user is simply a secondary method to authenticate, and is outside the scope of the OAuth integration.

@ericpaulsen ericpaulsen added the docs Area: coder.com/docs label Apr 14, 2025
EdwardAngert added a commit that referenced this issue Apr 23, 2025
closes #17375 

from @ericpaulsen 

> a prospect recently inquired about how our OAuth integration with
GitLab works, and I realized we do not have any information on
`GIT_ASKPASS` is used to retreive the OAuth token for users when they
run `git` operations.

Co-authored-by: EdwardAngert <[email protected]>
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
docs Area: coder.com/docs
Projects
None yet
Development

Successfully merging a pull request may close this issue.

1 participant