[英]GitHub Error - "ssh: connect to host github.com port 22: Operation timed out fatal: Could not read from remote repository."
[英]ssh: connect to host github.com port 22: Connection timed out fatal: Could not read from remote repository
所以当我试图从我公司的网络克隆一个 repo 时,我遇到了这个错误,我假设有防火墙阻止了该端口。
user@host:~/test_dir$ git clone git@github.com:master/migration.git
Cloning into 'migration'...
ssh: connect to host github.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.
我从这篇文章https://stackoverflow.com/a/54191729/4175957测试了解决方案,该解决方案是将以下行添加到~/.ssh/config
文件中:
Host github.com
Hostname ssh.github.com
Port 443
它没有用。 我试图找到的每个答案都说要做同样的事情,我还没有找到任何其他解决方法。
有任何想法吗?
我确认公司网络默认阻止任何出口 SSH 查询(以避免加密通量)
我只能在公司环境中将 HTTPS URL 与 github.com 一起使用。
因此,这将是官方的解决方法。
声明:本站的技术帖子网页,遵循CC BY-SA 4.0协议,如果您需要转载,请注明本站网址或者原文地址。任何问题请咨询:yoyou2525@163.com.