Repository navigation
Backlog
Labels
apiItems related to the APIauthenticationcliChanges that impact CLI functionalityenhancementNew feature or requestneeds-triageIssue needs initial triage by a maintainerskillsSkills lifecycle management
Description
Problem
Installing a skill or plugin from a private Git repo (git://github.com/my-org/...) only works when GITHUB_TOKEN, GITLAB_TOKEN, or GIT_TOKEN is set in the environment of the thv serve process (pkg/skills/gitresolver/auth.go). That's awkward in practice:
- Most users run ToolHive Desktop, whose embedded server inherits the app's launch environment (
toolhive-studio/main/src/toolhive-manager.ts). On macOS, an app launched from the Dock doesn't see shell variables, so private installs fail until the user quits Desktop and runsGITHUB_TOKEN=... thv serveby hand, or relaunches Desktop with the variable injected. - Setting the variable in the shell running
thv skill installdoes nothing, because the CLI is only an API client. Nothing tells the user this. GIT_TOKENis the only option for self-hosted hosts, and it gets sent to every host, so users can't scope a token to e.g.github.example.com.- ToolHive already has a secrets manager (
thv secret) that users rely on for MCP server credentials, but Git installs can't use it.
Proposal
Have the git resolver look up credentials from the configured secrets provider, scoped by host, before falling back to the env vars. Rough shape (open to alternatives):
- A host-scoped naming convention, e.g. a secret named
git/github.comorgit/github.example.com, or a small mapping in config from host to secret name - The existing env vars stay as a fallback for CI and headless use
- Optionally, a clearer error when a clone fails with an auth error, naming the expected host-scoped secret or env var and noting that the server process (not the CLI) does the clone
This would make private installs work the same way from the CLI and Desktop without restarting anything, and it would give per-host scoping for self-hosted Git servers instead of relying on the unscoped GIT_TOKEN.
Out of scope / related
- SSH and credential-helper support (
git://always clones over HTTPS today,pkg/skills/gitresolver/reference.go) - Docs for current behavior: [Gap]: Document authentication for private Git sources in skill and plugin installs docs-website#1387
Metadata
Metadata
Assignees
Labels
apiItems related to the APIauthenticationcliChanges that impact CLI functionalityenhancementNew feature or requestneeds-triageIssue needs initial triage by a maintainerskillsSkills lifecycle management
Activity