92 字
1 分钟
使用ssh连接git服务
生成密钥
ssh-keygen -t rsa -C "你的邮箱",然后一路回车,前往~/.ssh目录下查看密钥
打开id_rsa.pub文件,复制下来,前往[https://github.com/settings/keys]点击New ssh key,填写你刚刚复制的公钥内容,完成
测试
连接ssh进行测试
返回结果
PTY allocation request failed on channel 0Hi lijiashuai111! You've successfully authenticated, but GitHub does not provide shell access.Connection to github.com closed.完成,你现在可以使用ssh来进行克隆,拉取等操作了
分享
如果这篇文章对你有帮助,欢迎分享给更多人!
部分信息可能已经过时
相关文章 智能推荐






