Git - git pull 报错fatal: Custom certificate bundle not found at path
现象:每次拉取代码都需要身份验证,不友好且比较繁琐。
产生原因:在git clone时使用的是https地址,命令为:
git clone https://gitee.com/xxxxxx/edusasssvc.git
解决方案:先在桌面git bash 生成公钥,然后在gitee后台配置对应账号下(邮箱)的公钥,最后用git pull+ssh地址(git@gitee.com:xxxxxx/edusasssvc.git)拉取
步骤如下:
1)生成密钥,替换为你自己的邮箱(回车三次)
ssh-keygen -t rsa -C "你的邮箱"
2)查看你的 public key(公钥)
cat ~/.ssh/id_rsa.pub
3)码云gitee添加公钥
注意:邮箱必须公开才可以通过ssh的方式提供对IDE的Git操作。
4)配置用户名和密码
git config --global user.name "你的gitee账号"
git config --global user.email "你在gitee的邮箱地址"
5)测试ssh链接是否成功
ssh -T git@gitee.com
6)拉取代码
git clone git@gitee.com:xxxxxx/edusasssvc.git