[Baidu - Six Yi] github download speed code

method one:

As a developer, github is our standard, and often plagued by gitclone a project when the speed is too slow, looking at the console that a few dozen K K turtle speed, vomiting blood! !

The reason is simple: github of CDN is due to the great wall shielding.

So the solution is simple, is to manually put CDN and ip address binding it.


.

1. Get global.ssl.fastly address
access http://github.global.ssl.fastly.net.ipaddress.com/#ipinfo
get cdn ip address and domain name

.
2, get github address
access http://github.com.ipaddress.com/#ipinfo
get cdn ip address and domain name
.

3. Open the hosts mapped
Windows environment

C:\Windows\System32\drivers\etc\hosts

The most added at the end of two sentences:

151.101.185.194 http://github.global.ssl.fastly.net
192.30.253.112 http://github.com

Then save it.
.
.
.
Linux environment

sudo gedit /etc/hosts

Add to

151.101.185.194 http://github.global.ssl.fastly.net
192.30.253.112 http://github.com

Save, exit, and restart the network

/etc/init.d/networking restart


Method Two:

  1. The use of open source code repository China provided
    the title have made it very clear, I think for people who often use git terms, probably already know. For novices new to git of people, you might only know github.
    .
    In fact, there are many domestic code repository provider, not only foreign github. But the country is also just beginning, not many people are concerned about.
    China provides open source code repository provides a function, it is possible to github account code to the open source clone of China to account. This code repository called the cloud code, the code is right cloud?.
    It requires you to have a github account, one yard cloud gitee account.
    The steps are simple
    .
    The above github project you want to get down to the first frok your github account to go. Time: instant
    login gitee, not self-register. Web pages have a button to add an item, a plus sign. Click the plus sign, which has drop-down list of options for migrating github project, after opening the account associated with your github follow the prompts, then select the item you want to migrate, follow the prompts. Time: less than three minutes.
    According to clone github project method, clone migrate to gitee account of the project. The difference is replaced by a link destination linked clone project in gitee in. Download speed is usually MB / s units.
    According to the above method, substantially no longer need to clone code hook overnight.

.

Method three:

Improve download speed sub-module of
some projects in third-party code used in the warehouse, but these sub-modules submodule does not automatically download when you use the clone command, because they are stored at another address. You need to complete clone the target project, execution
.
git submodule update --init --recursive
.
Will be needed for the project will target sub-module relies download. github used in that project is still sub-modules placed on github. This was after the tragedy, which means that you are executing the above instructions, still need to face the top speed of 20KB / s of. Although at this time and will not be displayed, but it is still waiting for a long time.
.
We also use the above accelerated clone of ideas.
.
Where did you find submodule its use from the download link is a project.
Open links in the previous step, the code for the target sub-module will use the same frok to their github account, after the same method to migrate to gitee go. Multiple sub-modules operate on more than repeated several times, same routine.
Submodule module uses the original project migration to modify the link address into the address gitee in sub-module after.
Then go to perform
.
git submodule update --init --recursive
.


Congratulations, the deployment is complete!

Guess you like

Origin blog.51cto.com/14322706/2449168