1 、下载
sudo apt-get update
sudo apt-get install git
2、配置公钥
2.1、生成公钥
sudo ssh-keygen -t rsa -C “*********@qq.com” //双引号内我填的是我的帐号
之后有3次回车,其中有2次是输入密码的,此密码可为空,但我还是填了
2.2 查看公钥
sudo cat /root/.ssh/id_rsa.pub
把公钥的内容复制后填入下图
2.3、验证公钥
sudo ssh -T git@gitee.com
提示这个直接写yes
The authenticity of host ‘gitee.com (218.11.0.86)’ can’t be established.
ECDSA key fingerprint is SHA256:FQGC9Kn/eye1W8icdBgrQp+KkGYoFgbVr17bmjey0Wc.
Are you sure you want to continue connecting (yes/no)?yes
下面叫你填密码
Warning: Permanently added ‘gitee.com,218.11.0.86’ (ECDSA) to the list of known hosts.
Enter passphrase for key ‘/c/Users/duson/.ssh/id_rsa’:
若返回Welcome to Git…说明成功了
3、新项目后的
————————————————
版权声明:本文为CSDN博主「达大大」的原创文章,遵循 CC 4.0 BY-SA 版权协议,转载请附上原文出处链接及本声明。
原文链接:https://blog.csdn.net/qq_16855093/article/details/79098216