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
相关推荐
落魄大学生之流水线上谋生计7 小时前
幻境相机 Mirage Camera
github
wangruofeng7 小时前
从一个 10 万星 AI Agent 项目里,能学到什么真正的软件工程
github·agent·ai编程
子林super7 小时前
复杂JSON Schema结构与输出校验
github
子林super7 小时前
结构化输出解析失败处理策略
github
怕浪猫8 小时前
拆解 Google《AI Agent Handbook》:企业级 Agent 的六层架构与产品矩阵
面试·github·agent
kali-Myon8 小时前
分享一个网络安全 AI 工具导航项目 SecSkills
安全·ai·github·ctf
峰向AI18 小时前
Kage: 一个 244KB 文件,做出百万级视觉效果
github
m4Rk_1 天前
【论文阅读】Agent 记忆机制(74):CompassMem——从相似度检索走向事件图上的记忆导航
论文阅读·人工智能·学习·开源·github
wflynn1 天前
GitHub 日榜趋势速报 | 2026-09-18
开源·github
粥里有勺糖1 天前
视野修炼第133期 | Native 回春了?
前端·github·agent