-
Notifications
You must be signed in to change notification settings - Fork 982
chore: explain GIT_ASKPASS behavior in docs #12784
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
Changes from 1 commit
f218dfb
56048da
838fb0f
d686bcf
8759807
836dc71
cc351b8
File filter
Filter by extension
Conversations
Jump to
Diff view
Diff view
- VSCode configuration requirements
- Loading branch information
There are no files selected for viewing
Original file line number | Diff line number | Diff line change |
---|---|---|
|
@@ -212,8 +212,32 @@ you can require users authenticate via git prior to creating a workspace: | |
|
||
 | ||
|
||
The following example will require users authenticate via GitHub and auto-clone | ||
a repo into the `~/coder` directory. | ||
### `GIT_ASKPASS` will auto-refresh tokens | ||
|
||
<blockquote class="info"> | ||
<p> | ||
This is the preferred authentication method. | ||
</p> | ||
</blockquote> | ||
|
||
By default, the coder agent is configured to respond to `GIT_ASKPASS` prompts. | ||
Meaning, with no additional configuration, external authentication will work | ||
with native `git` commands. | ||
|
||
Note: Some IDE's override the `GIT_ASKPASS` environment variable and need to be | ||
configured. | ||
|
||
**VSCode** | ||
There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. We should note that this is automatically done for you. No manual user configuration is actually needed. There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. It is not automatically done though. The user must manually turn off the VSCode overrides. Does our extension do this for you? There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. See this issue: #12291 |
||
|
||
- Set `git.terminalAuthentication` to `false` | ||
- Set `git.useIntegratedAskPass` to `false` | ||
|
||
### Hard coded tokens do not auto-refresh | ||
|
||
If the token is required to be inserted into the workspace, for example | ||
[GitHub cli](https://cli.github.com/), the auth token can be inserted from the | ||
template. This token will not auto-refresh. The following example will | ||
authenticate via GitHub and auto-clone a repo into the `~/coder` directory. | ||
|
||
```hcl | ||
data "coder_external_auth" "github" { | ||
|
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
I think users will be unfamiliar with what
GIT_ASKPASS
is.We should approach this from a
git
perspective... as the tool most users are familiar with, and explain that we useGIT_ASKPASS
is a variable Git hooks into for authentication.It's worth mentioning that
coder external-auth token <id>
will output the same token as the Git hook will.There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Will update.