在windows上使用已生成的linux ssh密钥对连接github仓库的过程如下:
首先,将生成的私钥存储到Windows上的一个文件夹中,然后通过Git Bash进行操作:

接下来,将私钥文件移动到Git的SSH目录下:
GitHub Copilot
GitHub AI编程工具,实时编程建议
48 查看详情
$ mv E:/git_ssh_key/id_rsa ~/.ssh$ ls ~/.sshid_rsa known_hosts
移动私钥后,可以直接进行身份验证:
$ ssh -T git@github.comThe authenticity of host 'github.com (192.30.255.113)' can't be established.RSA key fingerprint is SHA256:nThbg6kXUpJWGl7E1IGOCspRomTxdCARLviKw6E5SY8.Are you sure you want to continue connecting (yes/no)? yesWarning: Permanently added 'github.com,192.30.255.113' (RSA) to the list of known hosts.Enter passphrase for key '/c/Users/admin/.ssh/id_rsa': # 输入私钥的密码# 末尾显示这一段表示验证成功Hi Binary-ZeroOne! You've successfully authenticated, but GitHub does not provide shell access.
以上就是使用已有的私钥进行GitHub验证的详细内容,更多请关注创想鸟其它相关文章!
版权声明:本文内容由互联网用户自发贡献,该文观点仅代表作者本人。本站仅提供信息存储空间服务,不拥有所有权,不承担相关法律责任。
如发现本站有涉嫌抄袭侵权/违法违规的内容, 请发送邮件至 chuangxiangniao@163.com 举报,一经查实,本站将立刻删除。
发布者:程序猿,转转请注明出处:https://www.chuangxiangniao.com/p/578772.html
微信扫一扫
支付宝扫一扫