/install github-private-repo-ssh-routing
GitHub Deploy Key Routing
Treat GitHub private repo access as a routing problem, not just a Git problem.
Core rules
- Use one deploy key per private repository unless a machine user is intentionally chosen.
- Use one SSH host alias per key.
- Point each repo remote at the correct alias explicitly.
- Do not rely on a catch-all
Host github.comwhen multiple deploy keys exist. - Verify SSH first, then Git, then push.
- If automation is involved, fix both the live repo remote and the config/script source that writes it.
Canonical pattern
Host github.com-backup
HostName github.com
User git
IdentityFile ~/.ssh/openclaw_backup_ed25519
IdentitiesOnly yes
git remote set-url origin [email protected]:OWNER/REPO.git
Use this skill when the machine has more than one private GitHub repo, more than one SSH key, or any recurring GitHub automation.
Quick triage
If you need the fastest route:
- Read
references/symptoms.mdand match the exact error. - Read
references/patterns.mdand compare the current alias + remote layout. - Read
references/decision-guide.mdonly if the identity model itself is still undecided. - Read
references/openclaw-automation.mdonly when a script, backup flow, or config value may be rewriting the remote.
Workflow
1. Identify the repo + remote actually in use
Check the local repo path, current remotes, and whether the failing action came from:
- an interactive repo command
- a backup/sync script
- a config file that stores the repo URL
- a cron/automation job
If the repo path and the config source differ, do not treat them as the same fix.
2. Identify the key-routing layer
Read references/patterns.md for the standard alias layout.
Read references/key-storage-by-system.md when OS-specific key locations or mixed Windows/WSL/macOS behavior may matter.
Ask:
- Which SSH alias is the repo using now?
- Which key does that alias select?
- Is that key actually authorized for this repo?
- Is a broad
Host github.comrule hijacking traffic?
3. Diagnose by symptom
Read references/symptoms.md and match the exact failure string before changing anything.
4. Choose the right identity model
Read references/decision-guide.md when the user is deciding between:
- deploy key
- personal SSH key
- machine user
Read references/identity-model-boundaries.md when the question is really about where SSH routing ends and GitHub API authority begins — especially for PR merge automation, release creation, or fine-grained PAT vs deploy key decisions.
5. Check automation-specific drift
Read references/openclaw-automation.md when the repo is used by OpenClaw backup/restore, plugins, cron jobs, or config-driven workflows.
6. Fix in the safe order
- Fix or add the SSH alias.
- Verify with
ssh -G \x3Calias>. - Test with
ssh -T git@\x3Calias>. - Update the repo remote URL.
- Update any config/script source that still writes the old remote.
- Verify with
git ls-remote origin. - Only then push or pull.
Minimal command set
ls -la ~/.ssh
sed -n '1,200p' ~/.ssh/config
git remote -v
ssh -G \x3Chost-alias> | sed -n '1,40p'
ssh -T git@\x3Chost-alias>
git ls-remote origin
Bundled script
For a read-only audit of one local repo, run:
scripts/audit-routing.sh /path/to/repo
The script summarizes:
- repo remotes
- inferred SSH alias from
origin ~/.sshfiles and permissions~/.ssh/configpreviewssh -Gsummary for the detected alias
Use the script to inspect before editing.
What to report
- Root cause in one sentence
- Whether the failure is local config, GitHub permission, or both
- The minimal fix
- Exactly what changed
- 确保已安装 OpenClaw(本地或 Docker 部署)
- 在对话框中输入安装命令:
/install github-private-repo-ssh-routing - 安装完成后,直接呼叫该 Skill 的名称或使用
/github-private-repo-ssh-routing触发 - 根据 Skill 的参数说明提供必要输入,即可获得结构化输出
Github Private Repo SSH Routing 是什么?
Diagnose and manage SSH keys, host aliases, and Git remotes for GitHub private repositories in multi-repo environments. Use when deploy keys collide, a machi... 它是一个面向 Claude Code / OpenClaw 的 AI Agent Skill 插件,目前累计下载 312 次。
如何安装 Github Private Repo SSH Routing?
在 OpenClaw 或 Claude Code 对话框中运行命令「/install github-private-repo-ssh-routing」即可一键安装,无需额外配置。
Github Private Repo SSH Routing 是免费的吗?
是的,Github Private Repo SSH Routing 完全免费,采用 MIT-0 许可证,可自由下载、安装和使用。
Github Private Repo SSH Routing 支持哪些平台?
Github Private Repo SSH Routing 跨平台运行,可在任意部署了 OpenClaw / Claude Code 的环境中使用(cross-platform)。
谁开发了 Github Private Repo SSH Routing?
由 DarinRowe(@darinrowe)开发并维护,当前版本 v1.0.1。