git push的时候出现无法访问的解决
fatal: 无法访问 'https://github.com/...':gnutls_handshake() failed: Error in the pull function.
push的时候没有输入自己的github账号密码,为了解决每次push都要登录github这个问题,采用ssh密钥的方式认证,可以免去每次都输入密码的麻烦:
1.生成密钥:ssh-keygen -t rsa -b 4096 -C "your_email@example.com"
2.查找并复制:
cat ~/.ssh/id_rsa.pub
将密钥粘贴github的settings的ssh中
之后直接push:
git push -u origin <branch-name>
【记得关掉代理服务器】
即可推送到github