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

接下来,将私钥文件移动到Git的SSH目录下:
$ mv E:/git_ssh_key/id_rsa ~/.ssh $ ls ~/.ssh id_rsa known_hosts
移动私钥后,可以直接进行身份验证:
$ ssh -T git@github.com The 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)? yes Warning: 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验证的详细内容,更多请关注php中文网其它相关文章!
每个人都需要一台速度更快、更稳定的 PC。随着时间的推移,垃圾文件、旧注册表数据和不必要的后台进程会占用资源并降低性能。幸运的是,许多工具可以让 Windows 保持平稳运行。
Copyright 2014-2025 https://www.php.cn/ All Rights Reserved | php.cn | 湘ICP备2023035733号