简体   繁体   English

ssh:连接到主机 github.com 端口 22:连接超时致命:无法从远程存储库读取

[英]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.

相关问题 GitHub 错误 - “ssh:连接到主机 github.com 端口 22:操作超时致命:无法从远程存储库读取。” - GitHub Error - "ssh: connect to host github.com port 22: Operation timed out fatal: Could not read from remote repository." ssh:连接到主机 gist.github.com 端口 22:操作超时致命:无法从远程存储库读取 - ssh: connect to host gist.github.com port 22: Operation timed out fatal: Could not read from remote repository 如何解决这个问题? ssh:连接到主机 github.com 端口 22:连接超时致命 - How to solve this? ssh: connect to host github.com port 22: Connection timed out fatal npm 安装错误:ssh:连接到主机 github.com 端口 22:连接超时 - npm install error: ssh: connect to host github.com port 22: Connection timed out ssh:连接到主机 github.com 端口 22:连接超时 - ssh: connect to host github.com port 22: Connection timed out ssh:连接到主机 gitlab.kpit.com 端口 22:连接被拒绝致命:无法从远程存储库读取 - ssh: connect to host gitlab.kpit.com port 22: Connection refused fatal: Could not read from remote repository 推送到远程存储库时“无法连接到 github.com 端口 443:连接超时” - "Failed to connect to github.com port 443: Connection timed out" when pushing to remote repository Github 连接到主机 github.com 端口 22:操作超时 - Github connect to host github.com port 22: Operation timed out `ssh:连接到主机 ssh.dev.azure.com 端口 22:连接超时`错误 - `ssh: connect to host ssh.dev.azure.com port 22: Connection timed out` error ssh:连接到主机端口 22:连接超时 - ssh: connect to host port 22: Connection timed out
 
粤ICP备18138465号  © 2020-2024 STACKOOM.COM