Warning: file_get_contents(/data/phpspider/zhask/data//catemap/9/git/25.json): failed to open stream: No such file or directory in /data/phpspider/zhask/libs/function.php on line 167

Warning: Invalid argument supplied for foreach() in /data/phpspider/zhask/libs/tag.function.php on line 1116

Notice: Undefined index: in /data/phpspider/zhask/libs/function.php on line 180

Warning: array_chunk() expects parameter 1 to be array, null given in /data/phpspider/zhask/libs/function.php on line 181

Warning: file_get_contents(/data/phpspider/zhask/data//catemap/1/cocoa/3.json): failed to open stream: No such file or directory in /data/phpspider/zhask/libs/function.php on line 167

Warning: Invalid argument supplied for foreach() in /data/phpspider/zhask/libs/tag.function.php on line 1116

Notice: Undefined index: in /data/phpspider/zhask/libs/function.php on line 180

Warning: array_chunk() expects parameter 1 to be array, null given in /data/phpspider/zhask/libs/function.php on line 181
Ruby on rails Heroku上的上载站点:主机密钥验证失败_Ruby On Rails_Git_Heroku_Github_Ssh - Fatal编程技术网

Ruby on rails Heroku上的上载站点:主机密钥验证失败

Ruby on rails Heroku上的上载站点:主机密钥验证失败,ruby-on-rails,git,heroku,github,ssh,Ruby On Rails,Git,Heroku,Github,Ssh,第一次在Heroku上卸载站点时,我遇到了很多错误。如何纠正 k@k-Aspire-5750G:~/q$ git clone git@github.com:priroda/programmer-site Cloning into 'programmer-site'... The authenticity of host 'github.com (192.30.252.131)' can't be established. RSA key fingerprint is 16:27:ac:a5:76

第一次在Heroku上卸载站点时,我遇到了很多错误。如何纠正

k@k-Aspire-5750G:~/q$ git clone git@github.com:priroda/programmer-site
Cloning into 'programmer-site'...
The authenticity of host 'github.com (192.30.252.131)' can't be established.
RSA key fingerprint is 16:27:ac:a5:76:28:2d:36:63:1b:56:4d:eb:df:a6:48.
Are you sure you want to continue connecting (yes/no)? 
Host key verification failed.
fatal: The remote end hung up unexpectedly
我在ssh目录中有2个文件:

k@k-Aspire-5750G:~/.ssh$ ls
id_rsa  id_rsa.pub

ssh

这里的问题看起来像是您试图
ssh
进入
heroku
clone
直接从
github
复制您的repo

这里的问题是,如果您通过
ssh
(第三方)连接到
github
,您基本上必须创建一个真实性令牌(),以便您的第三方机器能够连接到您的
github
repo

--

修复

通常,当您安装
git
heroku
时,您的本地计算机无论如何都会经过身份验证。因此,我建议您从本地计算机推送到Heroku,而不是尝试通过github进行克隆:

$ git remote add heroku git@heroku.com
$ git add .
$ git commit -a -m "Heroku Deploy"
$ git push heroku master
如果您第一次这样做,您可能会返回某种类型的请求,请求您的
ssh
被接受,或者什么-只是接受&它应该从您的本地机器推送到
Heroku


当您尝试克隆而与Heroku无关时,您的输出似乎与Github.com的主机验证有关


在~/.ssh/known_主机中查找github.com条目,突出显示并删除它。然后再次尝试克隆,它将提示验证,说是,然后应该成功克隆。

ssh目录中只有2个文件:id\u rsa id\u rsa.pub。没有文件知道\u主机。