手抄报 安全手抄报 手抄报内容 手抄报图片 英语手抄报 清明节手抄报 节约用水手抄报

sourceTree添加及使用SSH密钥

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

1、打开命令行窗口Terminal$ ssh-keygen -t rsa -b 4096 -C "[email protected]"此时在用户目录下生成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密钥
© 手抄报圈