Git 如何配置做个ssh-key

1.打开cmd命令行

执行:

ssh-keygen -t rsa -C "[email protected]" -f ~/.ssh/first_rsa

first_rsa为自己定义的密钥存储文件

2.输入命令回车后提示输入密码,一般不设置,回两次车就好

3.之后会生成一个first_rsa文件和first_rsa.pub的文件

4.把.pub文件里的内容复制到你的git账号中。

修改.ssh/下的config文件:

1 Host gitee.com
2 IdentityFile ~/.ssh/first_rsa

以上为自己Windows系统的配置过程

参考  https://www.cnblogs.com/poloyy/p/12189140.html

猜你喜欢

转载自www.cnblogs.com/bchf/p/12573824.html