Coding.net如何配置SSH Key
2018-11-30 本文已影响1人
虹猫1992
1、检查是否存在SSH Key
cd ~/.ssh
ls或者ll //看是否存在 id_rsa 和 id_rsa.pub文件,如果存在,说明已经有SSH Key
如下图:
![](https://img.haomeiwen.com/i2982021/2122642755ec642e.png)
2、生成SSH Key
ssh-keygen -t rsa -C [youremail@example.com](mailto:youremail@example.com)
如下图:
![](https://img.haomeiwen.com/i2982021/77fb0efbc78984d1.png)
3、coding.net添加SSH Key
登录coding.net,进入我的帐号->个人账户->SSH公钥->新增公钥
![](https://img.haomeiwen.com/i2982021/dfa4d72c2c06c5de.png)
取个名字,把之前拷贝的秘钥复制进去,添加就好啦
![](https://img.haomeiwen.com/i2982021/435d932ffd20e591.png)
4、验证和修改
测试是否成功配置SSH Key
ssh -T git@git.coding.net
运行结果出现类似如下:
![](https://img.haomeiwen.com/i2982021/a8203e26c75d3864.png)