Chinaunix首页 | 论坛 | 博客
  • 博客访问: 808460
  • 博文数量: 281
  • 博客积分: 0
  • 博客等级: 民兵
  • 技术积分: 2770
  • 用 户 组: 普通用户
  • 注册时间: 2009-08-02 19:45
个人简介

邮箱:zhuimengcanyang@163.com 痴爱嵌入式技术的蜗牛

文章分类
文章存档

2020年(1)

2018年(1)

2017年(56)

2016年(72)

2015年(151)

分类: 嵌入式

2017-07-03 16:09:16

http://www.cnblogs.com/rwxwsblog/p/4831936.html

  git作为一个版本管理神器,日常工作中自然也就少不了了;特别是Android开发,github和google是逃不过的了。然而很多时候需要用到git克隆远程的代码库,众所周知的原因google、android官网都是无法访问的。那么我们怎么克隆诸如:android.googlesource.com下的库呢?

  工具:git、vpn代理

  实例:git clone

D:\AndroidStudioProjects> git clone https://android.googlesource.com/platform/frameworks/volley/ Cloning into 'volley'...
fatal: unable to access '': Failed connect to android.googlesource.com:443; No error

  Failed connect to android.googlesource.com:443这很明显是由于被墙了。那么怎么办呢?首先想到的是VPN,前提是你需要有一个VPN。

  设置git代理

git config --global http.proxy "localhost:1080"

  再次运行

git clone https://android.googlesource.com/platform/frameworks/volley/

  此时可以看到如下结果

复制代码
D:\AndroidStudioProjects> git clone https://android.googlesource.com/platform/frameworks/volley/ Cloning into 'volley'...
remote: Counting objects: 81, done remote: Finding sources: 100% (81/81)
Receiving objects: 100% (2953/2953), 1.16 MiB | 23.00 KiB/s, done.
remote: Total 2953 (delta 263), reused 2953 (delta 263)R/263)
Resolving deltas: 100% (263/263), done.
Checking connectivity... done.
阅读(1040) | 评论(0) | 转发(0) |
给主人留下些什么吧!~~