网站首页 美食营养 游戏数码 手工爱好 生活家居 健康养生 运动户外 职场理财 情感交际 母婴教育 时尚美容

sourceTree添加及使用SSH密钥

时间:2024-10-26 19:49:11

1、打开命令行窗口Terminal$ ssh-keygen -t rsa -b 4096 -C "your_email@example.com"此时在用户目录下生成ssh公钥及对应密钥~/.ssh/id_rsa 及~/.ssh/id_rsa.pub

2、如果mac系统是10.12.2及以上,需要更改~/.ssh/config文件配置Host * AddKeysToAgent yes UseKeychain yes IdentityFile ~/.ssh/id_rsa

3、添加本地生成的ssh私钥到ssh-agentssh-add -K 本地私钥路径地址

4、在你需要clone的系统中,添加用户的ssh公钥pbcopy < ~/.ssh/id_rsa.pub复制公钥内容到剪切板中。

sourceTree添加及使用SSH密钥
© 2025 小知经验
信息来自网络 所有数据仅供参考
有疑问请联系站长 site.kefu@gmail.com