最近公司的gitlab host变更后,导致git命令失败,提示语如下:
$ git pull
ssh_dispatch_run_fatal: Connection to ------ port 22: Software caused connection abort
fatal: Could not read from remote repository.
Please make sure you have the correct access rights
and the repository exists.
查看了一下,原来是host变更了。网上查询了一下方法:
大致如下:
在C:\Windows\System32\drivers\etc
里面修改hosts文件,将新的ip和gitlab域名添加进去即可。