解决Unable to access 'https://gitee.com/自己的项目/': Could not resolve host: gitee.com问题
作者:FreedomDemo 时间:2023-11-06 06:47:59
昨天公司的网络更换,然后在使用git操作代码的时候,遇见了标题所述问题。
仅以此文,记录该问题的解决过程。
首先第一步:
得到本机的IP地址。
第二步:ping一下
说明连接正常。
第三步:
找到git目录下的 hosts文件。
一般目录为 C:\Program Files\Git\etc
# 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
在该文件下 添加 192.168.1.117 github.com
此处的IP 替换为自己的IP即可
修改之后 如上图所示。
来源:https://blog.csdn.net/weixin_37166398/article/details/101422239
![](/images/zang.png)
![](/images/jiucuo.png)
猜你喜欢
PHP开启opcache提升代码性能
解决python3中cv2读取中文路径的问题
PHP session 会话处理函数
千篇一律的JS运算符讲解,一起来看看
![](https://img.aspxhome.com/file/2023/7/125477_0s.png)
Python封装数据库连接池详解
![](https://img.aspxhome.com/file/2023/9/102959_0s.png)
使用Python读写多个sheet文件
![](https://img.aspxhome.com/file/2023/2/131372_0s.png)
Python函数式编程的用法详解
vue实现图片懒加载的方法分析
Oracle 触发器的使用小结
python的pytest框架之命令行参数详解(下)
![](https://img.aspxhome.com/file/2023/3/93803_0s.png)
ASP XML编程objXML.async = False
mysql中datetime类型设置默认值方法
python3批量删除豆瓣分组下的好友的实现代码
多次执行mysql_fetch_array()的指针归位问题探讨
python如何读写json数据
从零开始搭建基于Python的微信小程序的教程分享
如何只取数据库的前3条记录?
Python线程创建和终止实例代码
按钮的反馈
![](https://img.aspxhome.com/file/UploadPic/20091/1/1-60s.jpg)
能让Python提速超40倍的神器Cython详解
![](https://img.aspxhome.com/file/2023/2/64662_0s.png)