Windows GitBash解决Github添加密钥时提示Key is already in use的问题

通过添加多密钥实现

  • ssh-agent bash
  • ssh-keygen -t rsa -C 'xx1' -f ~/.ssh/id_rsa_xx1
  • ssh-keygen -t rsa -C 'xx2' -f ~/.ssh/id_rsa_xx2
  • ssh-add id_rsa_xx1
  • ssh-add id_rsa_xx2

vim ~/.ssh/config

shell 复制代码
Host github_xx1
 HostName github.com
 User git
 IdentityFile ~/.ssh/id_rsa_xx1
Host github_xx2
 HostName github.com
 User git
 IdentityFile ~/.ssh/id_rsa_xx2
  • ssh -T -ai ~/.ssh/id_rsa_xx1 git@github_xx1
  • ssh -T -ai ~/.ssh/id_rsa_xx2 git@github_xx2
相关推荐
徐小夕15 小时前
借助AI,1周,0后端成本,我开源了一款Office预览SDK
前端·vue.js·github
CoderJia程序员甲15 小时前
GitHub 热榜项目 - 日榜(2026-03-18)
ai·大模型·llm·github·ai教程
逛逛GitHub16 小时前
硅谷大佬把自己 Claude Code 武器库给开源了,1 周就 2 万点赞。
github
星浩AI17 小时前
清华团队开源!我给孩子制作了 AI 互动课堂,手把手教你给孩子做一个
人工智能·后端·github
NGC_661118 小时前
滑块验证:从原理到实战,拆解人机验证的核心逻辑
github
无限进步_20 小时前
深入解析C++容器适配器:stack、queue与deque的实现与应用
linux·开发语言·c++·windows·git·github·visual studio
irpywp1 天前
autoresearch:自主目标导向迭代的无限游戏
开源·github·karpathy·autoresearch
汪海游龙1 天前
03.19 AI 精选:开源异步编程 Agent 框架
github·hacker news
NocoBase1 天前
【教程】用 NocoBase 2.0 搭建一个极简的 IT 工单系统
人工智能·开源·github·无代码
sandwu1 天前
OpenClaw 3.13 正式发布:新增 Chrome DevTools MCP、会话绑定、插件生态全面升级
人工智能·github