我正在尝试将我的本地文件推送到远程源来获取此错误消息。我不知道如何解决这个问题,请帮忙!
$ git push -u origin --all
ssh: connect to host gitlab.com port 22: Connection timed out
fatal: Could not read from remote repository.
Please make sure you have the correct access rights
and the repository exists.
答案 0 :(得分:-1)
GitLab.com运行第二台SSH服务器,该服务器侦听不太可能被防火墙保护的常用端口443。
您要做的就是编辑~/.ssh/config
并更改连接到GitLab.com的方式。
Host gitlab.com
Hostname altssh.gitlab.com
User git
Port 443
PreferredAuthentications publickey
IdentityFile ~/.ssh/id_rsa
来源:https://about.gitlab.com/2016/02/18/gitlab-dot-com-now-supports-an-alternate-git-plus-ssh-port/