zoukankan      html  css  js  c++  java
  • 关于ping github.com超时的解决办法

    今天在使用git的时候执行将本地分支推送到远程分支的push操作时(同时为远程库创建和本地分支同名的分支),遇到了超时的错误,经过查询全网各位大牛的操作这里给出有效解决方式

    进入C:WindowsSystem32driversetc目录下找到hosts文件,以管理员身份运行后在文件尾插入下面两行即可(这里推荐使用notepad文本编辑器,右键以管理员身份运行后直接打开host文件,完成修改后ctrl+s保存真方便呀,妈妈再也不用担心我修改不了hosts文件了)

    192.30.253.112 github.com
    151.101.88.249 github.global.ssl.fastly.net

    整个hosts的文件如下:

    # Copyright (c) 1993-2009 Microsoft Corp.
    #
    # This is a sample HOSTS file used by Microsoft TCP/IP for Windows.
    #
    # This file contains the mappings of IP addresses to host names. Each
    # entry should be kept on an individual line. The IP address should
    # be placed in the first column followed by the corresponding host name.
    # The IP address and the host name should be separated by at least one
    # space.
    #
    # Additionally, comments (such as these) may be inserted on individual
    # lines or following the machine name denoted by a '#' symbol.
    #
    # For example:
    #
    #      102.54.94.97     rhino.acme.com          # source server
    #       38.25.63.10     x.acme.com              # x client host
    
    # localhost name resolution is handled within DNS itself.
    #    127.0.0.1       localhost
    #    ::1             localhost
    
    #0.0.0.1    mssplus.mcafee.com
    192.30.253.112 github.com
    151.101.88.249 github.global.ssl.fastly.net

    保存后重新打开cmd执行ping github.com即可ping通,关于git的推送超时的问题也迎刃而解

  • 相关阅读:
    Codeforces Round #636 (Div. 3)
    HTTP请求方法
    HDU2993
    《算法竞赛进阶指南》 #0x61 图论
    Codeforces Round #634 (Div. 3)
    Codeforces Round #633 (Div. 2)
    pandas 数据类型转换及描述统计
    pandas 数据库数据的读取
    pandas电子表格的读取(pandas中的read_excel)
    pandas外部数据的读取构造数据框-文本文件读取(一种utf-8中文编码乱码处理经验)
  • 原文地址:https://www.cnblogs.com/findview/p/11720245.html
Copyright © 2011-2022 走看看