You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
docs: add details on external authentication priority (#17164)
## Issue
Closes#16875
Clarify how Coder authentication works with Git providers, particularly
the order of authentication methods used.
## Changes Made
I've updated the External Authentication documentation to:
1. Clarify that Coder first attempts to use external auth provider
tokens when available, and only defaults to SSH authentication if no
tokens are available
2. Add more detailed explanations about both authentication methods
3. Improve the description of how the `coder gitssh` command works with
existing and Coder-generated SSH keys
## Verification
Claude verified that this accurately describes the behavior of the
codebase by reviewing the `gitssh.go` implementation, which shows how
Coder handles SSH authentication as a fallback when external auth is not
available.
[preview](https://coder.com/docs/@16875-git-workspace-auth/admin/external-auth)
<sub>🤖 Generated with https://claude.ai/code</sub>
---------
Signed-off-by: dependabot[bot] <[email protected]>
Co-authored-by: EdwardAngert <[email protected]>
Co-authored-by: Ben Potter <[email protected]>
Co-authored-by: M Atif Ali <[email protected]>
Co-authored-by: Bruno Quaresma <[email protected]>
Co-authored-by: Kyle Carberry <[email protected]>
Co-authored-by: Cian Johnston <[email protected]>
Co-authored-by: dependabot[bot] <49699333+dependabot[bot]@users.noreply.github.com>
Co-authored-by: Jon Ayers <[email protected]>
Co-authored-by: Hugo Dutka <[email protected]>
Co-authored-by: Ethan <[email protected]>
Co-authored-by: Michael Smith <[email protected]>
Co-authored-by: Claude <[email protected]>
Co-authored-by: Sas Swart <[email protected]>
Coder provides automatic Git authentication for workspaces through SSH authentication and Git-provider specific env variables.
77
+
78
+
When performing Git operations, Coder first attempts to use external auth provider tokens if available.
79
+
If no tokens are available, it defaults to SSH authentication.
80
+
81
+
### OAuth (external auth)
82
+
83
+
For Git providers configured with [external authentication](#configuration), Coder can use OAuth tokens for Git operations.
84
+
85
+
When Git operations require authentication, and no SSH key is configured, Coder will automatically use the appropriate external auth provider based on the repository URL.
86
+
87
+
For example, if you've configured a GitHub external auth provider and attempt to clone a GitHub repository, Coder will use the OAuth token from that provider for authentication.
88
+
89
+
To manually access these tokens within a workspace:
0 commit comments