克隆git存储库时发出RSA主机密钥警告 [英] Warning of RSA host key while cloning git repository

查看:288
本文介绍了克隆git存储库时发出RSA主机密钥警告的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!

问题描述

我正在使用git bash克隆我的github存储库并不断收到警告 我正在使用SSH, 我使用以下git命令:git clone git@github.com:TapanHP/HTextView,但它给出了这样的警告

I am using git bash to clone my github repository and getting warning continuously I am using SSH so, I use this git command: git clone git@github.com:TapanHP/HTextView but it gives warning like this

警告:将IP地址的RSA主机密钥永久添加到已知主机列表中

输入密钥'c/users/tapanhp/.ssh/id_rsa':

这是什么密码?为什么会这样呢?

what is this passphrase? and why this happens?

推荐答案

与GitHub的SSH连接使用RSA(一种形式的公钥加密).这意味着您有一个私钥和一个公钥.您向他人提供您的公共密钥(在本例中为GitHub),并使用您的私有密钥对数据进行加密.然后,他们可以使用您的公共密钥解密数据,该公共密钥只会解密使用您的私有密钥加密的信息.只要没有其他人拥有您的私钥,他们就不能假装是您.

The SSH connection to GitHub uses RSA, a form public key cryptography. This means that you have a private key and a public key. You give others your public key (in this case, GitHub), and use your private key to encrypt data. They can then decrypt the data using your public key, which will only decrypt information that was encrypted with your private key. As long as no one else has your private key, they can't pretend to be you.

实际上,您大概拥有文件c/users/tapanhp/.ssh/id_rsac/users/tapanhp/.ssh/id_rsa.pub.

In practical terms, you presumably have the files c/users/tapanhp/.ssh/id_rsa and c/users/tapanhp/.ssh/id_rsa.pub.

id_rsa.pub是您的公钥,id_rsa是您的私钥.为了保护它的私密性,无论生成它的人都选择了密码来对其进行加密.这就是所要求的密码.

id_rsa.pub is your public key, and id_rsa is your private key. To help keep it private, whoever generated it chose a passphrase to encrypt it with. That is the passphrase that is being asked for.

如果您生成了这个密钥对,那么就是您选择的任何密钥.如果有人这样做了,那就随他们所愿.

If you generated this key pair, then it is whatever you chose. If someone else did, then it is whatever they chose.

如果没人知道该密码,则必须生成一个新的密钥对,并为GitHub提供新的公共密钥.

If no one knows the passphrase, you will have to generate a new key pair and give GitHub the new public key.

GitHub为执行此操作提供了很好的指南: https://help. github.com/articles/generating-an-ssh-key/

GitHub provides a nice guide for doing this: https://help.github.com/articles/generating-an-ssh-key/

警告消息只是告诉您,它正在将GitHub的SSH服务器的IP地址与其加密密钥相关联.这样做是为了防止中间人攻击.

The warning message is just telling you that it is associating the IP address of GitHub's SSH server with their encryption key. This is done to help prevent man-in-the-middle attacks.

这篇关于克隆git存储库时发出RSA主机密钥警告的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!

查看全文
登录 关闭
扫码关注1秒登录
发送“验证码”获取 | 15天全站免登陆