因为不可抗拒的原因,在乌鲁木齐从 github 上面克隆项目时,会超时克隆不了。

使用 https 方式报错:

$ git clone https://github.com/xxx.git
Cloning into 'xxx'...
fatal: unable to access 'https://github.com/xxx.git/': Failed to connect to github.com port : Timed out

使用 ssh 方式报错:

$ git clone git@github.com:xxx.git
Cloning into 'xxx'...
ssh: connect to host github.com port : Connection timed out
fatal: Could not read from remote repository. Please make sure you have the correct access rights
and the repository exists.

场景:使用 vpn

github 可以正常访问,git clone 运行超时

解决方法:

1. 配置 git 的代理

git config --global http.proxy "127.0.0.1:1080"
git config --global https.proxy "127.0.0.1:1080"

这里是关键:需要本地启动 vpn

2. 使用 https 方式  clone

$ git clone https://github.com/xxx.git

注意:这里必须使用 https 方式, ssh 方式即使配置了 git 的代理也不好使。。。

吐槽:

也不知道屏蔽个 github 干嘛,前阶段 csdn 也屏蔽了,不过还好最近放开了。

git clone Timed out 解决的更多相关文章

  1. python进阶(六) 虚拟环境git clone报错解决办法

    在虚拟环境目录,进行git clone xxxxx.git  项目,报如下图错误 解决办法:env GIT_SSL_NO_VERIFY=true git clone xxxx.git

  2. git clone慢的解决办法

    转自:http://www.kindemh.cn/ 转自Kindem的博客 问题 大家可能都遇到过从github使用git clone指令奇慢无比的问题,网上很多人说使用代理来加速git,但是这也不是 ...

  3. Git clone远程目录443:Timed out 问题(go get)

    现象: 在cmd中用go get -u github.com/kataras/iris   ,提示:443:Timed out 于是在 git bash 中   git clone https://g ...

  4. git clone https://github.com/istester/ido.git ,确提示“Failed to connect to 192.168.1.22 port 8080: Connection refused” 的解决办法 。

    不知道是否有同学遇到如下的问题: p.p1 { margin: 0.0px 0.0px 0.0px 0.0px; font: 11.0px Menlo } span.s1 { } git clone ...

  5. 使用Bandwagon服务器ftp解决git clone速度慢的问题

    写在前面 git clone速度往往很慢,我们可以先在身处美国的服务器上git clone,然后把文件用ftp传回来即可. 开始 我们以opencv为例 git clone https://githu ...

  6. 解决macOS git clone Azure DevOps提示身份认证失败问题

    macOS的终端输入git clone对应Azure DevOps的Git地址,紧接着输入正确的用户名和密码仍然会提示认证失败.解决的方法是安装微软的Git-Credential-Manager.由于 ...

  7. 我的Git教程 之 解决 git clone后无代码

    解决 git clone 后无代码 前言:这个教程只适用于像我一样大致理解Git的原理,但是不太记得住Git命令的同学使用.所以具体原理只会提一下,具体可以参见Pro Git. 在另一篇 简明的教程  ...

  8. git clone Google的代码失败的解决方法

    git clone Google的volley代码遇Q. 想到用代理服务器就可以解决这个问题.Google了一下解决方法,记录下来,分享一下. git config:                 

  9. 解决$ git clone fatal: Authentication failed

    今天在使用git clone克隆项目的时候报如下错误: $ git clone XXXXXX Cloning into 'XXXX'... fatal: Authentication failed f ...

随机推荐

  1. enumerate 枚举

  2. PADS Layout CAM 的中高级焊盘选项

    PADS Layout CAM 的中高级焊盘选项 PADS CAM Gerber 输出非常灵活. 以至于很多人跳坑. 以这个这选项,最好的方式就是不勾.

  3. Vue 中的 computed 和 methods

    Vue 中的 computed 和 methods 使用 computed 性能会更好. 如果你不希望缓存,可以使用 methods 属性.

  4. HIVE-默认分隔符的(linux系统的特殊字符)查看,输入和修改

    这段时间做hive的时候,用到了系统默认分隔符.通常下面2中情况我们需要需要用到分隔符 1,制作table的输入文件,有时候我们需要输入一些特殊的分隔符 2,把hive表格导出到本地时,系统默认的分隔 ...

  5. Java基础--注解Annotation

    Annotation是给类,方法或域上加的一种特殊的标记,可以通过反射取到注解的类型和值,从而完成某种特定的操作. 定义注解需要使用元注解,元注解有@Retention和@Target //@Rete ...

  6. Windows命令行操作MySQL

    使用命令行操作mysql的一些简单步骤: //进入MySQL数据库    > mysql -hlocalhost -uroot -p//显示  所有数据库    > show databa ...

  7. 关于HTML标签中的一些容易忘记常用样式属性

    样式说明--样式: margin, margin-top/left/bottom/right -- 外边距; padding, padding-top/left/botton/right -- 内边距 ...

  8. 深入VR之前 你应该知道VR头显透镜原理

    转自:http://www.gamelook.com.cn/2016/03/246817 要理解虚拟现实头显透镜的工作原理,首先要搞懂眼睛是如何看到事物的. 眼睛瞳孔后有晶状体,也就是眼珠子.眼睛的背 ...

  9. linux串口基本编程

    Linux的串口表现为设备文件.Linux的串口设备文件命名一般为/dev/ttySn(n=0.1.2„„),若串口是USB扩展的,则串口设备文件命名多为/dev/ttyUSBn(n=0.1.2„„) ...

  10. 国际化---demo1---bai

    login.jsp <%@ page language="java" import="java.util.*" pageEncoding="UT ...