解決Unable to access 'https://gitee.com/自己的項目/': Could not resolve host: gitee.com問題
昨天公司的網(wǎng)絡(luò)更換,然后在使用git操作代碼的時候,遇見了標(biāo)題所述問題。
僅以此文,記錄該問題的解決過程。
首先第一步:

得到本機(jī)的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即可

修改之后 如上圖所示。
總結(jié)
到此這篇關(guān)于解決Unable to access 'https://gitee.com/自己的項目/': Could not resolve host: gitee.com問題的文章就介紹到這了,更多相關(guān)Unable to access 'https://gitee.com/自己的項目/': Could not resolve host: gitee.com內(nèi)容請搜索腳本之家以前的文章或繼續(xù)瀏覽下面的相關(guān)文章希望大家以后多多支持腳本之家!
相關(guān)文章
nacos?2.1.0集群多節(jié)點(diǎn)部署最新詳細(xì)教程
這篇文章主要介紹了全網(wǎng)最新的nacos?2.1.0集群多節(jié)點(diǎn)部署教程,本文給大家介紹的非常詳細(xì),對大家的學(xué)習(xí)或工作具有一定的參考借鑒價值,需要的朋友可以參考下2022-07-07
Eslint在Vscode中使用的一些相關(guān)技巧總結(jié)
ESLint 是一個代碼規(guī)范和錯誤檢查工具,所有東西都是可以插拔的,這篇文章主要給大家介紹了關(guān)于Eslint在Vscode中使用的一些相關(guān)技巧總結(jié),文中通過代碼介紹的非常詳細(xì),需要的朋友可以參考下2024-07-07
git 配置多個SSH-Key實(shí)現(xiàn)示例
這篇文章主要為大家介紹了git 配置多個SSH-Key實(shí)現(xiàn)示例詳解,有需要的朋友可以借鑒參考下,希望能夠有所幫助,祝大家多多進(jìn)步,早日升職加薪2023-07-07
程序員用vscode聽網(wǎng)易云的實(shí)現(xiàn)
很多程序員在工作的時候都喜歡聽歌,最近發(fā)現(xiàn)了一個vscode插件,可以直接使用vscode進(jìn)行聽歌,本文就詳細(xì)的介紹一下如何使用,感興趣的可以了解一下2021-12-12
解決HTTP服務(wù)響應(yīng)數(shù)據(jù)不完整響應(yīng)數(shù)據(jù)截斷的問題
這篇文章主要介紹了HTTP服務(wù)響應(yīng)數(shù)據(jù)不完整響應(yīng)數(shù)據(jù)截斷的問題及解決方法,本文給大家介紹的非常詳細(xì),對大家的學(xué)習(xí)或工作具有一定的參考借鑒價值,需要的朋友可以參考下2022-03-03

