Change the hosts under Mac to fix the slow problem of accessing GitHub

Source: Internet
Author: User
Tags administrator password
Change the hosts under Mac to fix the slow problem of accessing GitHub

Mac under the Hosts file in/etc/hosts. So open the terminal first. Then enter the following command to open the Hosts file.

su vim /etc/hosts

Enter your Mac administrator password to open the Hosts file using Vim. Place the following GitHub host in the Hosts file. In the Vim editor, press "I" to enter the insert mode, you can change the following hosts to paste into the Hosts file.

http://github.com 204.232.175.94 http://gist.github.com 107.21.116.220http://help.github.com 207.97.227.252 http://nodeload.github.com 199.27.76.130http://raw.github.com 107.22.3.110 http://status.github.com 204.232.175.78http://training.github.com 207.97.227.243 http://www.github.com

Then press the "ESC" key and enter "SHIFT +;" To switch vim to save mode. Then enter "Wq" to save the hosts file.

Change the hosts under Mac to fix the slow problem of accessing GitHub

Contact Us

The content source of this page is from Internet, which doesn't represent Alibaba Cloud's opinion; products and services mentioned on that page don't have any relationship with Alibaba Cloud. If the content of the page makes you feel confusing, please write us an email, we will handle the problem within 5 days after receiving your email.

If you find any instances of plagiarism from the community, please send an email to: info-contact@alibabacloud.com and provide relevant evidence. A staff member will contact you within 5 working days.

A Free Trial That Lets You Build Big!

Start building with 50+ products and up to 12 months usage for Elastic Compute Service

  • Sales Support

    1 on 1 presale consultation

  • After-Sales Support

    24/7 Technical Support 6 Free Tickets per Quarter Faster Response

  • Alibaba Cloud offers highly flexible support services tailored to meet your exact needs.