Warning: file_get_contents(/data/phpspider/zhask/data//catemap/1/ssh/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
gitlab-ssh_交换_标识:读取:对等方重置连接_Ssh_Gitlab - Fatal编程技术网

gitlab-ssh_交换_标识:读取:对等方重置连接

gitlab-ssh_交换_标识:读取:对等方重置连接,ssh,gitlab,Ssh,Gitlab,我正在尝试从Macbook的Gitlab服务器克隆。克隆时,出现以下错误: manzanita-226-109:icarus homeuser$ git clone elm:dummy/dummy.git Cloning into 'dummy'... ssh_exchange_identification: read: Connection reset by peer fatal: Could not read from remote repository. Please make sur

我正在尝试从Macbook的Gitlab服务器克隆。克隆时,出现以下错误:

manzanita-226-109:icarus homeuser$ git clone elm:dummy/dummy.git
Cloning into 'dummy'...

ssh_exchange_identification: read: Connection reset by peer
fatal: Could not read from remote repository.

Please make sure you have the correct access rights
and the repository exists.
当我尝试使用ssh连接到gitlab服务器时,我得到以下结果:

OpenSSH_7.6p1, LibreSSL 2.6.2
debug1: Reading configuration data /Users/homeuser/.ssh/config
debug1: Reading configuration data /etc/ssh/ssh_config
debug1: /etc/ssh/ssh_config line 48: Applying options for *
debug1: Connecting to elm.ndc.nasa.gov port 22.
debug1: Connection established.
debug1: key_load_public: No such file or directory
debug1: identity file /Users/homeuser/.ssh/id_rsa type -1
debug1: key_load_public: No such file or directory
debug1: identity file /Users/homeuser/.ssh/id_rsa-cert type -1
debug1: key_load_public: No such file or directory
debug1: identity file /Users/homeuser/.ssh/id_dsa type -1
debug1: key_load_public: No such file or directory
debug1: identity file /Users/homeuser/.ssh/id_dsa-cert type -1
debug1: key_load_public: No such file or directory
debug1: identity file /Users/homeuser/.ssh/id_ecdsa type -1
debug1: key_load_public: No such file or directory
debug1: identity file /Users/homeuser/.ssh/id_ecdsa-cert type -1
debug1: key_load_public: No such file or directory
debug1: identity file /Users/homeuser/.ssh/id_ed25519 type -1
debug1: key_load_public: No such file or directory
debug1: identity file /Users/homeuser/.ssh/id_ed25519-cert type -1
debug1: Local version string SSH-2.0-OpenSSH_7.6
ssh_exchange_identification: read: Connection reset by peer
我可以在gitlab服务器上使用Google Chrome,没有任何问题。我还尝试从不同的服务器克隆和ssh'ing,没有任何问题。我没有这个gitlab服务器的管理员权限,但我不相信那里有任何禁止/黑名单软件

有人能提供建议吗

ssh_exchange_identification: read: Connection reset by peer
这基本上意味着TCP连接在被服务器接受后立即恢复。常见的原因有:

  • 远程SSH服务器软件出现故障(例如,它崩溃)
  • 远程SSH服务器软件配置为出于某种原因断开连接
  • 您和服务器之间的某些路由器或其他网络设备正在干扰TCP连接

无法从客户机调试消息中准确判断出问题所在。您需要在服务器上对此进行故障排除。例如,远程SSH服务器程序可能有一个日志文件,您可以查看。

我也有类似的问题,我发现/var/empty文件夹的所有者错误。我运行了“sudo chown root/var/empty”,它解决了这个问题。

在我的服务器(Docked GitLab)上,问题是我对/etc/GitLab中的sshd密钥授予了错误的权限,这可以通过检查/var/log/GitLab/sshd中的日志看到

我通过使用以下命令更改服务器上的权限来解决此问题:

chmod -R 700 /etc/gitlab

我也犯了同样的错误。也许它是通用的,但我的问题是服务器有一些未提交的更改,在我可以从我的计算机推送更改之前,需要添加并提交这些更改。希望这能节省一些时间,因为它浪费了几个小时。谢谢

我刚刚将url从ssh更改为http,它修复了所有问题

git remote set-url origin https://username@gitclient.com/reposetory_address

添加我的场景。在我的例子中,github服务器是私有的,以前github repo服务器ip是固定的,我将其添加到/etc/hosts文件中。服务器ip在维护后已更新,但主机文件未更新。我删除了/etc/hosts文件中的固定项,错误消失了。 仅供参考,以防有人碰到同样的问题