当前位置:   article > 正文

git报错处理:ssh:connect to host github.com port 22: Connection timed out_ssh: connect to host gitcode.net port 22: connecti

ssh: connect to host gitcode.net port 22: connection timed out

一、背景

git 在上传、下载 文件的时候,报错。

报错信息:

ssh:connect to host github.com port 22: Connection timed out

提示这个域名github.com port 的22 端口,链接超时。

我直接访问github.com 这个域名是可以访问的,ping 也是可以ping通的。

使用telnet 链接github.com 的22 端口,报超时错误。

telnet xx.xx.xx 22

所以,问题就在这个22端口上。

二、解决办法

我原来使用的ssh链接方式,会报这个错误。

改成http ,就可以了。

在github上,把ssh 改成 http 。

 上传 和下载 也是用http的方式。

git clone http://xxx.xxx.com/xxxxx.git

本文内容由网友自发贡献,转载请注明出处:【wpsshop博客】
推荐阅读
相关标签
  

闽ICP备14008679号