昨天公司的網(wǎng)絡更換,然后在使用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即可
修改之后 如上圖所示。
總結
到此這篇關于解決Unable to access 'https://gitee.com/自己的項目/': Could not resolve host: gitee.com問題的文章就介紹到這了,更多相關Unable to access 'https://gitee.com/自己的項目/': Could not resolve host: gitee.com內(nèi)容請搜索腳本之家以前的文章或繼續(xù)瀏覽下面的相關文章希望大家以后多多支持腳本之家!
您可能感興趣的文章:- Git建立本地倉庫并上傳到Gitee的詳細步驟
- Gitee的下載安裝配置及使用步驟詳解
- 微信小程序使用gitee進行版本管理
- Python自動化運維和部署項目工具Fabric使用實例
- Python自動化部署工具Fabric的簡單上手指南
- Python的自動化部署模塊Fabric的安裝及使用指南
- 使用Gitee自動化部署python腳本的詳細過程