因为不可抗拒的原因,在乌鲁木齐从 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. 统计日志中ip出现的次数

    grep -r 'GET /weixin/weixin_izp/index.html' ./chunyun.access.log > ~/access.log cat access.log |a ...

  2. CodeChef - SQRGOOD:Simplify the Square Root (求第N个含平方因子数)

    Tiny Wong the chef used to be a mathematics teacher in a senior high school. At that time, he always ...

  3. 19年博客flag

    目录 为什么没有年终总结 为什么今天更新了 19年博客flag 个人博客链接:我在马路边 https://hhongwen.cn 更好的阅读体验点击查看原文:19年博客flag 原创博客,转载请注明出 ...

  4. Maven实现直接部署Web项目到Tomcat7

    如题目,自动部署到Web服务器,直接上过程. 1.Tomcat7的用户及权限配置:在conf目录下,找到tomcat-users.xml,添加manager权限的用户. <role rolena ...

  5. Java 虚拟机-Java内存区域

    简要介绍Java的内存区域: 运行时数据区域 HotSpot虚拟机对象 一.概览 二.运行时数据区域 2.1 程序计数器 Program Counter Register,代表当前线程所执行的字节码的 ...

  6. 机器学习:集成学习(Ada Boosting 和 Gradient Boosting)

    一.集成学习的思路 共 3 种思路: Bagging:独立的集成多个模型,每个模型有一定的差异,最终综合有差异的模型的结果,获得学习的最终的结果: Boosting(增强集成学习):集成多个模型,每个 ...

  7. top命令 Linux查看CPU和内存使用情况,cpu监控之一

    一.top命令 top命令是一个功能十分强大的监控系统的工具,对于系统管理员而言尤其重要.但是,它的缺点是会消耗很多系统资源. 在系统维护的过程中,随时可能有需要查看 CPU 使用率,并根据相应信息分 ...

  8. ThreadPoolExecutor的corePoolSize和maximumPoolSize

    按照JDK文档的描述, 如果池中的实际线程数小于corePoolSize,无论是否其中有空闲的线程,都会给新的任务产生新的线程 如果池中的线程数>corePoolSize and <max ...

  9. java restful response 万能类

    import java.util.HashMap; import java.util.Map; public class ResponseData { private final String mes ...

  10. .Net 一直在改变

    Microsoft 微软又进一步了,每天都有惊喜. MSDN,是微软官网开发者技术支持网络,今天给我一个小惊喜,不多说直接上图.分享给大家 右键新打开Tab选项,就能看到官方的源码实现.为我们学习提供 ...