[英]ssh: connect to host github.com port 22: Connection timed out fatal: Could not read from remote repository
So I've been getting this error when attempting to clone a repo from my company's network, and I'm assuming there's a firewall blocking the port.所以当我试图从我公司的网络克隆一个 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.
I tested the solution from this post https://stackoverflow.com/a/54191729/4175957 which was to add the following lines to the ~/.ssh/config
file:我从这篇文章https://stackoverflow.com/a/54191729/4175957测试了解决方案,该解决方案是将以下行添加到
~/.ssh/config
文件中:
Host github.com
Hostname ssh.github.com
Port 443
It didn't work.它没有用。 Every answer I try to find says to do the same thing, I haven't found any other workaround.
我试图找到的每个答案都说要做同样的事情,我还没有找到任何其他解决方法。
Any ideas?有任何想法吗?
I confirm a company network is by default blocking any egress SSH query (to avoid encrypted flux)我确认公司网络默认阻止任何出口 SSH 查询(以避免加密通量)
I can only use HTTPS URL with github.com in a company environment.我只能在公司环境中将 HTTPS URL 与 github.com 一起使用。
That would therefore be the official workaround.因此,这将是官方的解决方法。
声明:本站的技术帖子网页,遵循CC BY-SA 4.0协议,如果您需要转载,请注明本站网址或者原文地址。任何问题请咨询:yoyou2525@163.com.