Github出现 ssh operation timed out
2017-10-24 16:14
330 查看
这两天在mac上使用github出现了问题,
通过google的查询,参考了该博客的内容,可能的原因是ssh默认使用的22端口出现了问题,更换端口可以解决该问题。流程如下:
修改
在修改config文件如下:
重新使用SSH测试连接
完成了上面的步骤,再使用
如果在443端口也出现了timeout的问题,则可以尝试切换回22端口再尝试,即使用
git push命令一直未响应,直到超时出现了如下的错误
git push origin master ssh: connect to host github.com port 22: Operation timed out fatal: Could not read from remote repository. Please make sure you have the correct access rights and the repository exists.
通过google的查询,参考了该博客的内容,可能的原因是ssh默认使用的22端口出现了问题,更换端口可以解决该问题。流程如下:
修改
~/.ssh/config文件
在修改config文件如下:
Host github.com User xxx@yy.com #注册github的邮箱 Hostname ssh.github.com PreferredAuthentications publickey IdentityFile ~/.ssh/id_rsa # 公钥的存放位置 Port 443
重新使用SSH测试连接
ssh -T git@github.com Hi xxx! You've successfully authenticated, but GitHub does not provide shell access.
如果在这步中要求接受或者拒绝远程主机的公钥,输入yes即可。
完成了上面的步骤,再使用
git push命令就没有问题了。
如果在443端口也出现了timeout的问题,则可以尝试切换回22端口再尝试,即使用
mv命令重命名
~/.ssh/config文件,使其失效。
相关文章推荐
- Git克隆提交出现“ssh: connect to host github.com port 22: Operation timed out fatal”问题
- mac 配置 ssh 到git (Could not resolve hostname github.com, Failed to connect to github.com port 443 Operation timed out)
- git clone时出现ssh: connect to host github.com port 22: Connection timed out fatal: Could not read from
- MAC - 使用 brew 安装东西时出现 curl: (7) Failed connect to downloads.sf.net:443; Operation timed out 的解决办法
- yum下载很慢,卡在extras,然后出现Operation timed out 和 Trying other mirror.
- 阿里云ECS使用SSH连接CentOS 6.9经常断线的问题解决:OperationTimedOut
- 2.git 连接报"ssh: connect to host github.com port 22: Connection timed out"错误
- ssh: connect to host github.com port 22: Connection timed out
- curl: (7) Failed to connect to raw.githubusercontent.com port 443: Operation timed out
- ssh:connect to localhost port 22: Operation timed out
- ssh: connect to host github.com port 22: Connection timed out
- ubuntu 14.04下scp传输文件出现ssh: connect to host ***port 22: Connection timed out
- 项目启动时出现"the operation timed out "
- connect to host ssh.github.com port 22: Connection timed out解决方法
- 解决ssh-connect-to-host-github-com-port-22-connection-timed-out
- 解决ssh-connect-to-host-github-com-port-22-connection-timed-out
- github连接报"ssh: connect to host github.com port 22: Connection timed out"错误
- 解决 connect to host github.com port 22 operation timed out
- 解决ssh-connect-to-host-github-com-port-22-connection-timed-out
- github连接报"ssh: connect to host github.com port 22: Connection timed out"错误