GITHUB国内PULL太慢解决办法
有时在使用GITHUB下载代码时速度非常慢,几b的速度,几M的代码半个小时都没传完,可试试以下办法
解决方案:
将地址由github.com改为github.com.cnpmjs.org
比如原来代码地址为:https://github.com/fcemails/fcblog.git
则改为:https://github.com.cnpmjs.org/fcemails/fcblog.git
操作过程:
可以看到改之前的速度,204b
[root@7dy blog]# git pull https://github.com/fcemails/fcblog.git
Username for 'https://github.com': fcemails
Password for 'https://fcemails@github.com':
remote: Enumerating objects: 147, done.
remote: Counting objects: 100% (147/147), done.
remote: Compressing objects: 100% (99/99), done.
^Cceiving objects: 77% (88/113), 1.81 MiB | 204 bytes/s
更改后的速度,84KB,虽然不算很快,但比之前提升了非常多,不到2分钟完成 :
[root@7dy blog]# git pull https://github.com.cnpmjs.org/fcemails/fcblog.git
Username for 'https://github.com.cnpmjs.org': fcemails
Password for 'https://fcemails@github.com.cnpmjs.org':
remote: Enumerating objects: 147, done.
remote: Counting objects: 100% (147/147), done.
remote: Compressing objects: 100% (99/99), done.
remote: Total 113 (delta 27), reused 93 (delta 10), pack-reused 0
Receiving objects: 100% (113/113), 3.44 MiB | 84.00 KiB/s, done.
Resolving deltas: 100% (27/27), completed with 18 local objects.
From https://github.com.cnpmjs.org/fcemails/fcblog
* branch HEAD -> FETCH_HEAD
Updating e89d9c8..3e783ab
Fast-forward
关于GITLAB详细的安装使用可参考另一篇:http://www.fclog.cn/article/10
感谢您的阅读,本文由
FC LOG 版权所有。(未允许请勿转载)