git clone 别人的github项目会提示Host key verification failed
伊谢尔伦
伊谢尔伦 2017-04-24 09:13:10
0
3
867

git clone git@github.com:Unknwon/qiniudrive.git 失败!(怎么回事?)

RSA key fingerprint is xx:xx:xx:xx:xx:xx:xx:xx:xx:xx
Are you sure you want to continue connecting (yes/no)?
Host key verification failed.
fatal: Could not read from remote repository.
Please make sure you have the correct access rights
and the repository exists.

clone自己的项目不会出现这样的提示。这是怎么回事?


git clone git://github.com/Unknwon/qiniudrive.git 成功!

为什么git@github.com:Unknwon/qiniudrive.git 失败了???

伊谢尔伦
伊谢尔伦

小伙看你根骨奇佳,潜力无限,来学PHP伐。

reply all(3)
阿神

git clone git://github.com/Unknwon/qiniudrive.git This uses the git protocol.

git@github.com:Unknwon/qiniudrive.git This is using ssh protocol. ssh will verify the key of the other party's server. It has no way to confirm that the key presented by the server is trusted, so it asks you whether the key really belongs to the server you want to connect to. You didn't say "yes"So ssh thinks you don't want to continue connecting, so the connection fails.

迷茫

Actually, this problem can be solved with just a Google search.

Although it can be solved, you can actually understand the general principles of git.
That is, there is usually a git user on the server, and you access project files through the git user.

So how to log in to the remote host through git to get the code? Let’s take a look at ssh login again.

There are two ways to authenticate ssh, one is to enter the password, and the other is direct RSA authentication (RSA authentication is recommended). There will be a .ssh folder in the home directory, which is used to store public keys, private keys, known_host, authorized_keys and configuration files.

....10,000 words are omitted here

How to solve your problem specifically, I still hope you can Google it yourself. If you encounter a problem, try to solve it yourself first. If you can't solve it, ask Google. If the problem cannot be solved by Google, it will be better to ask it later.

阿神

http://itfan.github.io/#show/2013-06-07-use-github-on-windows

Latest Downloads
More>
Web Effects
Website Source Code
Website Materials
Front End Template