Warning: file_get_contents(/data/phpspider/zhask/data//catemap/1/typo3/2.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
为什么我在git上获得ssh\u exchange\u标识:连接被远程主机关闭?_Git_Github_Ssh - Fatal编程技术网

为什么我在git上获得ssh\u exchange\u标识:连接被远程主机关闭?

为什么我在git上获得ssh\u exchange\u标识:连接被远程主机关闭?,git,github,ssh,Git,Github,Ssh,从终端克隆回购协议: git clone git@github.foohost.com:barrepo.git Cloning into 'foorepo'... ssh_exchange_identification: Connection closed by remote host fatal: Could not read from remote repository. Please make sure you have the correct access rights and the

从终端克隆回购协议:

git clone git@github.foohost.com:barrepo.git
Cloning into 'foorepo'...
ssh_exchange_identification: Connection closed by remote host
fatal: Could not read from remote repository.

Please make sure you have the correct access rights
and the repository exists.
我已经按步骤走了,但是什么时候 我有同样的结果:

ssh -T git@github.foohost.com:
ssh_exchange_identification: Connection closed by remote host
使用冗长的

ssh -v git@github.foohost.com
OpenSSH_7.9p1, LibreSSL 2.7.3
debug1: Reading configuration data /Users/Fred/.ssh/config
debug1: /Users/Fred/.ssh/config line 18: Applying options for *
debug1: /Users/Fred/.ssh/config line 27: Applying options for github.foohost.com
debug1: /Users/Fred/.ssh/config line 41: Applying options for *.foohost.com
debug1: Reading configuration data /etc/ssh/ssh_config
debug1: /etc/ssh/ssh_config line 48: Applying options for *
debug1: Executing proxy command: exec ssh -q b.snc1 nc github 22
debug1: identity file /Users/Fred/.ssh/baz_rsa type 0
debug1: identity file /Users/Fred/.ssh/baz_rsa-cert type -1
debug1: Local version string SSH-2.0-OpenSSH_7.9
ssh_exchange_identification: Connection closed by remote host
我可以使用https克隆repo,但在此之后,我无法执行其他操作(签出/推送…)


有什么建议可能导致这种情况或如何解决

在我的例子中,这是由于缺少VPN连接

此外,@YesThatIsMyName评论道:

您可以尝试网站上的步骤,如ssh-v,以获得更详细的信息 输出。另外,您可以使用详细的输出更新您的问题


您可以尝试网站上的步骤,如
ssh-v
,以获得更详细的输出。另外,您可以用详细的输出更新您的问题。谢谢您的建议!我就是这么做的。