当前位置: 代码迷 >> 综合 >> ssh: connect to host 192.168.90.XXX port 22: Connection refused fatal: Could not read from remote re
  详细解决方案

ssh: connect to host 192.168.90.XXX port 22: Connection refused fatal: Could not read from remote re

热度:39   发布时间:2024-02-05 10:55:02.0

git使用ssh克隆项目的时候 一直报错

git clone git@192.168.90.XXX:demo/demo.git
ssh: connect to host 192.168.90.XXX port 22: Connection refused
fatal: Could not read from remote repository.Please make sure you have the correct access rights

检查公钥什么的都已配置。后来怀疑是端口号问题,果然gitlab的ssh端口号有22改为了22622。

解决方案:

git clone ssh://git@192.168.90.XXX:22622/demo/demo.git

clone后面加上 ssh://,项目名前面增加端口号22622/

  相关解决方案