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

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

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

整个hosts的文件如下:

# Copyright (c) - 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
# :: 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的推送超时的问题也迎刃而解

最新文章

  1. 5种处理js跨域问题方法汇总(转载)
  2. sql 截取日期
  3. jQuery Ajax上传文件
  4. struts2文件上传提示信息国际化
  5. xcode 6 创建的工程上下有黑边
  6. Group By Count不能显示0的问题
  7. mybatis的#{}和${}的区别以及order by注入问题
  8. 有趣的linux命令
  9. asp.net webuploader粘贴,拖拽,点击上传图片
  10. Import Items – Validation Multiple Languages Description
  11. git 秘钥的生成
  12. JDK源码阅读(一) ArrayList
  13. [React Testing] Setting up dependencies && Running tests
  14. [每日一题] OCP1z0-047 :2013-07-30 表连接――内联视图当作表使用
  15. SpringMvc之java文件下载
  16. Universal-Image-Loader分析:
  17. C#设计模式(0)-认识设计模式
  18. Java:import com.sun.awt.AWTUtilities;报错
  19. git命令详解( 六 )
  20. cron表达式总结

热门文章

  1. python3 pathlib库中的Path类的使用
  2. makefile小计
  3. PHP处理SOAP
  4. Linux简介和各发行版介绍
  5. .net core 读取配置文件的值
  6. 【转帖】普通程序员如何转向AI方向
  7. [转帖]Helm 3 使用 harbor 作为仓库存储 charts
  8. TP5多字段排序
  9. GoF的23种设计模式之行为型模式的特点和分类(2)
  10. qbittorrent搜索插件合集