赞
踩
1. 通过git bash进入项目,设置使用ssh连接,git remote add origin git@github.com:xxx/project.git
2. 生成github.com对应的公钥和私钥
3. 进入https://github.com/settings/ssh/new,添加ssh keys
StrictHostKeyChecking no
UserKnownHostsFile /dev/null
#gitlab
Host github.com
HostName github.com
IdentityFile ~/.ssh/id_rsa_github
User hyxxxx
4. 执行测试命令测试是否配置成功(会自动在.ssh目录生成known_hosts文件把私钥配置进去)
5.若出现警告信息:Warning: Permanently added 'github.com,13.229.188.59' (RSA) to the list of known hosts.
Copyright © 2003-2013 www.wpsshop.cn 版权所有,并保留所有权利。