Warning: file_get_contents(/data/phpspider/zhask/data//catemap/1/php/263.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
Php 主机密钥验证失败_Php_Git_Ssh - Fatal编程技术网

Php 主机密钥验证失败

Php 主机密钥验证失败,php,git,ssh,Php,Git,Ssh,我已经在我的服务器上创建了一个ssh密钥,并在Github上添加了et 当我使用webhook调用我的服务器上的php页面时 <?php `git pull`; 但它继续不起作用 你有什么建议吗 主机密钥验证失败 这意味着服务器主机密钥不受信任(这是正常的--无法从脚本验证该密钥--您应该手动执行) 转到,在那里可以看到要验证的指纹 然后更改为该用户运行脚本(apache?),例如使用sudo并运行ssh github.com。它将提示您验证指纹。如果它们匹配,请写“是”,然后脚本应该通

我已经在我的服务器上创建了一个ssh密钥,并在Github上添加了et

当我使用webhook调用我的服务器上的php页面时

<?php `git pull`;
但它继续不起作用

你有什么建议吗

主机密钥验证失败

这意味着服务器主机密钥不受信任(这是正常的--无法从脚本验证该密钥--您应该手动执行)

转到,在那里可以看到要验证的指纹


然后更改为该用户运行脚本(
apache
?),例如使用sudo并运行
ssh github.com
。它将提示您验证指纹。如果它们匹配,请写“是”,然后脚本应该通过。

我的密钥指纹与github上的不同,如何更改?我不明白,当我尝试ssh-t时git@github.com当前位置我有这个消息:嗨,阿曼德尔/圣阿波罗尼亚!您已成功通过身份验证,但GitHub不提供shell访问。通常情况下这是好的,但我总是有相同的错误,当我使用ssh github.com时,我的权限被拒绝(publickey)。
ssh-keygen -R github.com