git clone clone is slow? ? ? How to solve it?

Hello, ladies man

       You may sometimes inexplicable, FML how I pull myself properly, a new company to give him the authority to pull a code is so slow, what reason?

It is limiting corporate network? ? ? With a warehouse on github git clone download time, very slow, only a few dozen k per second, slightly big points warehouses to wait until these years.

       Sometimes github, git clone with some people say is another domain name to download: global-ssl.fastly.Net, no wonder the hosts which added github.com of dns still not solve the problem. 

This is a solution, there is another super simple, a command (need I can whisper or micro-channel can whisper)       

github acceleration follows:

premise:

1. Find the ip address corresponding to the domain name, and modify the hosts file

nslook global.ssl.fastly.Net # obtain the domain name of the IP
nslookup to obtain the IP domain name github.com #

 

 

Linux hosts file path:

sudo vim /etc/hosts

 

2. Add the two lines at the end of the hosts file

  •    Obtain the domain name of the IP 151.101.72.249 #
  •    Here 192.30.253.112 # 112 or 113 depending on your situation adjustment (here need to get IP, the need over the wall, CSDN is prohibited to publish foreign websites, micro-channel contact a friend in need, the lowest see)

3. Restart the computer, so the hosts file to take effect. Flush the DNS cache  

(Gong restart following three)

   1)、sudo /etc/init.d/networking restart

   2) can not be turned off? Top right manually disconnect and reconnect to the network

   3), restart the computer (the restart Dafa)

 

You will find a lot faster git clone speed. At least improve, you can try. Personally tried

author: Bruce.D (I need another private chat, micro-letters: gtcarry888 mark what he wanted, thank you)

Published 53 original articles · won praise 61 · views 50000 +

Guess you like

Origin blog.csdn.net/qq_40884473/article/details/99678018