因为不可抗拒的原因,在乌鲁木齐从 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 也屏蔽了,不过还好最近放开了。

最新文章

  1. Smarty模版引擎的原理
  2. 实战MEF(5):导出元数据
  3. HTML5图形图像处理技术研究
  4. apache开启.htaccess及.htaccess的使用方法(转)
  5. Cocos2d-x 3.2 学习笔记(十三)CocoStudio UI编辑器 by 保卫萝卜
  6. Beta版本——第三次冲刺博客
  7. python idle 清屏问题的解决
  8. css 正方体
  9. java泛型的使用
  10. IPAddress
  11. php 解决乱码的通用方法
  12. geyear和getfullyear的区别
  13. java.lang.RuntimeException: java.sql.SQLException: Too many parameters: expected 0, was given 1 Quer
  14. java内部类demo
  15. .NET企业级应用WebService上传下载文件
  16. CarbonData-1:common
  17. github 遇到Permanently added the RSA host key for IP address '192.30.252.128' to the list of known hosts问题解决
  18. HNUOJ 13341
  19. Jenkins配置基于角色的项目权限管理
  20. Unity 5 Game Optimization (Chris Dickinson 著)

热门文章

  1. hdu-2544-最短路(SPFA模板)
  2. java微信学习 接入
  3. string类的常用功能演示
  4. [Luogu4177][CEOI2008]order
  5. 下载安装tomcat至服务器
  6. deque容器
  7. 使用Nginx配置资源虚拟路径
  8. mysql之 percona-xtrabackup 2.4.7安装(热备工具)
  9. Oracle记录(一)Oracle简介与安装
  10. Linux驱动 - SPI驱动 之四 SPI数据传输的队列化