Skip to content

Use the secrets manager for private Git skill and plugin installs #7414

Backlog

Description

@danbarr

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 runs GITHUB_TOKEN=... thv serve by hand, or relaunches Desktop with the variable injected.
  • Setting the variable in the shell running thv skill install does nothing, because the CLI is only an API client. Nothing tells the user this.
  • GIT_TOKEN is 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.com or git/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

Activity

  1. added
    enhancement
    skills
    on Nov 30, 2026
  2. added
    needs-triage
    cli
    api
    on Nov 30, 2026
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Metadata

Metadata

Assignees

No one assigned

    Labels

    apiauthenticationclienhancementneeds-triageskills

    Type

    No type

    Projects

    No projects

      Milestone

      No milestone

      Relationships

      None yet

      Development

      No branches or pull requests

      Issue actions