Recipe: Private Enterprise Skills
Install skills from private repositories using token authentication.
Scenario
Your organization hosts internal skills in a private GitHub/GitLab repository. You need to install and update these skills without exposing credentials in config files.
Solution
Step 1: Set up authentication
skillshare detects tokens from environment variables, with platform-specific vars taking priority over the generic fallback:
| Platform | Environment Variable |
|---|---|
github.com | GITHUB_TOKEN |
gitlab.com | GITLAB_TOKEN |
| Bitbucket | BITBUCKET_TOKEN (+ optional BITBUCKET_USERNAME) |
| Azure DevOps | AZURE_DEVOPS_TOKEN |
| Gitea / Self-hosted Gitea | GITEA_TOKEN |
| CNB | CNB_TOKEN |
| Any platform (fallback) | SKILLSHARE_GIT_TOKEN |
Provider tokens are sent only over HTTPS on the default port (or 443): github.com, gitlab.com, bitbucket.org, dev.azure.com, *.visualstudio.com, gitea.com, and cnb.cool. Self-hosted Gitea/CNB requires an exact hostname in gitea_hosts/cnb_hosts, even if its name contains the provider name. For self-hosted GitHub/GitLab or other hosts, use a host-scoped Git credential helper, or set SKILLSHARE_GIT_TOKEN only for the intended invocation. That generic fallback can be sent to any HTTPS source; provider-looking names do not authorize provider tokens.
# Option A: Git credential helper (recommended for GitHub)
gh auth login # sets up git credential helper for HTTPS
# Option B: Platform-specific environment variable
export GITHUB_TOKEN=ghp_xxxxxxxxxxxxx # GitHub
export GITLAB_TOKEN=glpat-xxxxxxxxxxxxx # GitLab
export AZURE_DEVOPS_TOKEN=your-pat-here # Azure DevOps
# Option C: Generic fallback (works with any HTTPS host)
export SKILLSHARE_GIT_TOKEN=your-token-here
Step 2: Install from private repo
skillshare install your-org/internal-skills --track
skillshare detects the token automatically from the environment variables listed above.
Step 3: Verify tracking
skillshare list
The installed repo appears with the _ prefix (tracked repository):
_your-org-internal-skills/
├── code-review/
├── testing-standards/
└── deployment-checklist/
Step 4: Update cycle
skillshare check # Detect upstream changes
skillshare update # Pull latest
skillshare sync # Push to targets
Verification
skillshare listshows the tracked reposkillshare checkcan reach the remote and compare hashesskillshare synccreates symlinks in all targets
Variations
- Selective install:
skillshare install your-org/internal-skills --skill code-reviewinstalls only one skill - CI/CD token: In pipelines, set the platform-specific env var (e.g.,
GITHUB_TOKEN) from CI secrets - Self-hosted GitHub/GitLab: Use a host-scoped Git credential helper, or provide the token only for this invocation:
SKILLSHARE_GIT_TOKEN=your-token skillshare install https://gitlab.internal.com/team/skills.git --track.GITHUB_TOKEN/GITLAB_TOKENare not sent to self-hosted instances. - Self-hosted Gitea: Set
GITEA_TOKENand always list the exact hostname ingitea_hosts. - Gitee / AtomGit: Supported via HTTPS URLs with
SKILLSHARE_GIT_TOKEN