git clone 很慢太慢怎么办

git clone 太慢怎么办? - V2EX
V2EX = way to explore
V2EX 是一个关于分享和探索的地方
已注册用户请 &
Sponsored by
国内领先的实时后端云野狗 API 可用于开发即时聊天、网络游戏、实时定位等实时场景传输快!响应快!入门快!
Promoted by
git clone 太慢怎么办?
15:00:40 +08:00 · 11745 次点击
git clone :atom/atom.gitCloning into 'atom'...remote: Reusing existing pack: 98902, done.Receiving objects:
5% (), 1.02 MiB | 8.00 KiB/s
这么慢的速度怎么办好呢?clone了2次,由于网络问题中断了,然后就重新clone。git clone也不能断点续传。要不哪位v友贡献一个迅雷种子?
第 1 条附言 &·&
18:23:27 +08:00
在各位v友的帮助下,atom终于完整clone!百度盘下载链接:/s/1EiqL4步骤如下:1. clone最新一个提交```$ git clone --depth=1 :atom/atom.gitCloning into 'atom'...remote: Counting objects: 444, done.remote: Compressing objects: 100% (359/359), done.remote: Total 444 (delta 20), reused 264 (delta 8)Receiving objects: 100% (444/444), 2.25 MiB | 7.00 KiB/s, done.Resolving deltas: 100% (20/20), done.Checking connectivity... done.```2. 更新获取完整历史版本```$ git fetch --unshallowremote: Counting objects: 98400, done.remote: Compressing objects: 100% (), done.remote: Total 98159 (delta 68929), reused 97823 (delta 68611)Receiving objects: 100% (), 236.07 MiB | 18.00 KiB/s, done.Resolving deltas: 100% (), completed with 175 local objects.:atom/atom
dbe15f7..7cdaaf2
-& origin/masterremote: Counting objects: 7, done.remote: Compressing objects: 100% (7/7), done.remote: Total 7 (delta 0), reused 7 (delta 0)Unpacking objects: 100% (7/7), done. * [new tag]
-& v0.0.1 * [new tag]
-& v0.0.2 ...此处省略91行 * [new tag]
-& v0.92.0
* [new tag]
-& v0.93.0
* [new tag]
-& v0.94.0 ```期间也中断过,和直接clone一样,都不支持续传。下面的事实可以说明我这里速度有多慢:unshallow后git status一看:```$ git stOn branch masterYour branch is behind 'origin/master' by 3 commits, and can be fast-forwarded.
(use "git pull" to update your local branch)nothing to commit, working directory clean```----分割线------使用https的速度比ssh协议的速度快,至少快2倍。不知为何?使用gitconfig的https proxy速度并未有显著提升,看来瓶颈还是在本身的网络环境。@ 没看懂怎么使用@ @ proxychains未安装成功,貌似不在Homebrew官方Formula里?proxychains官方最新版是3.1版吗?github上还有一个4.2.0版本,还有一个ng版(next generation),好混乱...
29 回复 &| &直到
12:18:34 +08:00
& & 15:03:24 +08:00
1. 加一个 --depth=1
2. 登录到海外VPS git clone 然后 tar zcf :D
& & 15:06:28 +08:00
download zip 也不行吗?
& & 15:09:07 +08:00
哈哈哈,早上看见你在微博上抱怨了。
& & 15:15:47 +08:00
最近是慢,,,
& & 15:16:00 +08:00
这和迅雷种子有一毛钱关系 ??
& & 15:19:49 +08:00
@ 我也在弄,还没装好 ╮(╯▽╰)╭
试了好几次了,龟速~
Desktop & git clone
Cloning into 'atom'...
remote: Reusing existing pack: 98902, done.
Receiving objects:
25% (), 10.49 MiB | 5 KiB/s
zip解压后编译了两次没成功,而且包比较小,不知什么原因。clone下来的项目能达到100M+,昨晚clone到90%,然后就再也没动过。
今天Github宕机,又中断了几次~
& & 15:21:17 +08:00
肉身翻墙是最优解
& & 15:21:59 +08:00
@ --depth=1不错,只取最新的2个提交,库小了很多。据说最后可以通过git fetch --unshallow来获取完整库。 第二个方法我差点就这么干了 :)
download zip的只是最新分支的内容,不包含git库信息哦~
& & 15:22:49 +08:00
看了--depth=1,突然反应过来了,知道为什么压缩包较小了。
& & 15:26:12 +08:00
@ git clone --depth=1然后很快就下载完啦~ 现在git fetch --unshallow中,不知道这个支持断点不
& & 15:47:38 +08:00
& & 15:55:48 +08:00
ss + proxychains
& & 17:49:46 +08:00
~/.gitconfig
[http]
proxy = sock5://127.0.0.1:7070
配个ssh tunnel或者shadowsocks
& & 19:30:37 +08:00 via Android
@ 正解
然后用https地址即可
& & 19:58:30 +08:00
在美国VPS上clone然后打包回来再chmod一下就好了。
& & 20:07:59 +08:00
简单来说曲径通幽,复杂点就是肉身翻墙
& & 20:56:20 +08:00
之前用这个
不过现在没提供服务了,有谁有条件搭建个就好了
& & 21:53:44 +08:00 via iPhone
13L 正解,改 libcurl config 也行
& & 22:26:02 +08:00
/svRQ5HV.png
要在下分享给你一份?
gero [dot] rim [at] gmail [dot] com
& & 22:33:20 +08:00
& & 22:38:36 +08:00
@ 这是 ubuntu?
& & 00:12:25 +08:00
看到标题我就猜到是 atom 了。。。
最后我是用 apt-get 安装成功的。
& & 00:30:34 +08:00 via Android
Ubuntu 14.04 LTS + Tmux + ohMyZSH +powerLine
& & 00:31:49 +08:00 via iPhone
& & 07:56:28 +08:00
应该是连github慢吧 proxy 一下就快了
& & 09:09:45 +08:00
@ proxychains,楼主会喜欢的
& & 10:10:02 +08:00
vpn就好了,现在没有vpn,日子太难过了,各种蜗牛
& & 10:39:03 +08:00
试试powerpac?
github在部分地区神速,在部分地区龟速.似乎取决于宽带运营商?
& & 12:18:34 +08:00
有一款名为 proxychains 的软件,可以在命令行针对某一个命令进行代理
& · & 947 人在线 & 最高记录 1847 & · &
创意工作者们的社区
World is powered by solitude
VERSION: 3.9.7.3 · 49ms · UTC 03:36 · PVG 11:36 · LAX 20:36 · JFK 23:36? Do have faith in what you're doing.从远程库克隆 - 廖雪峰的官方网站
从远程库克隆
上次我们讲了先有本地库,后有远程库的时候,如何关联远程库。
现在,假设我们从零开发,那么最好的方式是先创建远程库,然后,从远程库克隆。
首先,登陆GitHub,创建一个新的仓库,名字叫gitskills:
我们勾选Initialize this repository with a README,这样GitHub会自动为我们创建一个README.md文件。创建完毕后,可以看到README.md文件:
现在,远程库已经准备好了,下一步是用命令git clone克隆一个本地库:
$ git clone :michaelliao/gitskills.git
Cloning into 'gitskills'...
remote: Counting objects: 3, done.
remote: Total 3 (delta 0), reused 0 (delta 0)
Receiving objects: 100% (3/3), done.
$ cd gitskills
注意把Git库的地址换成你自己的,然后进入gitskills目录看看,已经有README.md文件了。
如果有多个人协作开发,那么每个人各自从远程克隆一份就可以了。
你也许还注意到,GitHub给出的地址不止一个,还可以用/michaelliao/gitskills.git这样的地址。实际上,Git支持多种协议,默认的git://使用ssh,但也可以使用https等其他协议。
使用https除了速度慢以外,还有个最大的麻烦是每次推送都必须输入口令,但是在某些只开放http端口的公司内部就无法使用ssh协议而只能用https。
要克隆一个仓库,首先必须知道仓库的地址,然后使用git clone命令克隆。
Git支持多种协议,包括https,但通过ssh支持的原生git协议速度最快。
Make a Comment
Sign In to Make a Comment
You can sign in directly without register:
You need authorize to allow connect to your social passport for the first time.
WARNING: You are using an old browser that does not support HTML5.
Please choose a modern browser ( /
/ ) to get a good experience.Linux下Git和GitHub使用方法总结_Linux教程_Linux公社-Linux系统门户网站
你好,游客
Linux下Git和GitHub使用方法总结
来源:Linux社区&
作者:chenguolin
1 Linux下Git和GitHub环境的搭建
第一步: 安装Git,使用命令 &sudo apt-get install git&
第二步: 创建GitHub帐号
第三步: 生成ssh key,使用命令 &ssh-keygen -t rsa -C "your_"&,your_email是你的email
第四步: 回到github,进入Account Settings,左边选择SSH Keys,Add SSH Key,title随便填,粘贴key。
第五步: 测试ssh key是否成功,使用命令&ssh -T &,如果出现You&ve successfully authenticated, but GitHub does not provide shell access 。这就表示已成功连上github。
第六步: 配置Git的配置文件,username和email
git config --global user.name "your name" //配置用户名
git config --global user.email "your email" //配置email
2 利用Git从本地上传到GitHub
第一步: 进入要所要上传文件的目录输入命令 &git init&
第二步: 创建一个本地仓库origin,使用命令 &git remote add origin :yourName/yourRepo.git&youname是你的GitHub的用户名,yourRepo是你要上传到GitHub的仓库
第三步: 比如你要添加一个文件xxx到本地仓库,使用命令 &git add xxx&,可以使用&git add .&自动判断添加哪些文件
然后把这个添加提交到本地的仓库,使用命令 &git commit -m &说明这次的提交& &
最后把本地仓库origin提交到远程的GitHub仓库,使用命令 &git push origin master&
3 从GitHub克隆项目到本地
第一步: 到GitHub的某个仓库,然后复制右边的有个&HTTPS clone url&
第二步: 回到要存放的目录下,使用命令 "git clone /chenguolin/scrapy.git",红色的url只是一个例子
第三步: 如果本地的版本不是最新的,可以使用命令 &git fetch origin&,origin是本地仓库
第四步: 把更新的内容合并到本地分支,可以使用命令 &git merge origin/master&
如果你不想手动去合并,那么你可以使用: git pull &本地仓库& master // 这个命令可以拉去最新版本并自动合并
4 GitHub的分支管理
1 创建一个本地分支: git branch &新分支名字&
2 将本地分支同步到GitHub上面: git push &本地仓库名& &新分支名&
3 切换到新建立的分支: git checkout &新分支名&
4 为你的分支加入一个新的远程端: git remote add &远程端名字& &地址&
5 查看当前仓库有几个分支: git branch
1 从本地删除一个分支: git branch -d &分支名称&
2 同步到GitHub上面删除这个分支: git push &本地仓库名& :&GitHub端分支&
5 常见错误
1 如果出现报错为ERROR: Repository not found.fatal: The remote end hung up unexpectedly则代表你的 origin 的url 链接有误,可能是创建错误,也可能是这个 :xxx/new-project.git url 指定不正确。重新创建。
Git 的详细介绍:Git 的下载地址:
推荐阅读:
如何在 GitHub 建立组织
GitHub Linux下使用方法
Windows下Eclipse搭建GitHub开发环境图文教程
R语言 3.0.1 源码已经提交到 GitHub
Git权威指南 PDF高清中文版
相关资讯 & & &
& (03月18日)
& (02月10日)
& (03月30日)
& (02月13日)
& (02月06日)
图片资讯 & & &
   同意评论声明
   发表
尊重网上道德,遵守中华人民共和国的各项有关法律法规
承担一切因您的行为而直接或间接导致的民事或刑事法律责任
本站管理人员有权保留或删除其管辖留言中的任意内容
本站有权在网站内转载或引用您的评论
参与本评论即表明您已经阅读并接受上述条款使用git建立远程仓库,让别人git&clone下来
gitOurUnixcsdnleader
ourunix@ubuntu:~$ mkdir testgit
ourunix@ubuntu:~$ cd testgit/
ourunix@ubuntu:~/testgit$ git init
Initialized empty Git repository in
/home/wlp/testgit/.git/
ourunix@ubuntu:~/testgit$ echo "hello,git" &
ourunix@ubuntu:~/testgit$ git add sayhi.txt
ourunix@ubuntu:~/testgit$ git commit -m ""
[master (root-commit) b87b535]
files changed, 1 insertions(+), 0 deletions(-)
create mode 100644 sayhi.txt
ourunix@ubuntu:~/testgit$ git remote add origin
ssh://IP/~/testgit/.git
.git/config
ourunix@ubuntu:~/testgit$ git push origin master
ourunix@ubuntu:~/testgit$git remote show origin
ourunix@ubuntu:~/test$ git clone ssh://IP/home//testgit/.git
Initialized empty Git repository in
/home/wlp/test/git/.git/
xxx‘s password:
remote: Counting objects: 3, done.
Receiving objects: 100% (3/3), done.
remote: Total 3 (delta 0), reused 0 (delta 0)
博客分类:
Ubuntu下测试ssh时使用ssh localhost 命令,出现错误提示connect to host localhost
port 22:Connection refused
造成这个错误的原因可能是ssh-server未安装或者未启动。ubuntu 11.10
默认安装openssh-client,但是木有安装server
运行 ps -e | grep ssh,查看是否有sshd进程
如果没有,说明server没启动,通过 /etc/init.d/ssh -start 启动server进程,如果提示ssh不存在
那么就是没安装server
通过 sudo apt-get install openssh-server命令安装即可
已投稿到:
以上网友发言只代表其个人观点,不代表新浪网的观点或立场。}

我要回帖

更多关于 git clone下载速度慢 的文章

更多推荐

版权声明:文章内容来源于网络,版权归原作者所有,如有侵权请点击这里与我们联系,我们将及时删除。

点击添加站长微信