git clone 出现错误 Could not resolve host: github.com
git clone 出现错误 Could not resolve host: github.com
- 一、错误原因
- 二、解决方法
- 1、解析出域名对应的IP地址
- 2、把域名和IP地址添加到主机的hosts配置文件中
一、错误原因
git clone 从github上克隆项目的时候出现这个错误,下面我贴出详细的错误信息
mosheng@ms-server:11_DSPR$ git clone https://github.com/cszn/DPSR.git
Cloning into 'DPSR'...
fatal: unable to access 'https://github.com/cszn/DPSR.git/': Could not resolve host: github.com
这个错误的原因可能是github.com
域名没有被主机解析,下面给出具体的解决方法:
二、解决方法
1、解析出域名对应的IP地址
命令:ping 域名地址
mosheng@ms-server:11_DSPR$ ping github.com
PING github.com (13.229.188.59) 56(84) bytes of data.
从上面可以看到,解析出的github的域名的IP地址为:13.229.188.59
2、把域名和IP地址添加到主机的hosts配置文件中
host配置文件的地址:/etc/host
vi /etc/hosts
然后把13.229.188.59 github.com
添加到对应的下方,之后保存退出即可
最后在克隆一下试试吧,应该是惊喜把!!!
♠ ⊕ ♠ ⊕ ♠ ⊕ ♠ ⊕ ♠ ⊕ ♠ ⊕ ♠ ⊕ ♠ ⊕ ♠ ⊕ ♠ ⊕ ♠ ⊕ ♠ ⊕ ♠ ⊕ ♠ ⊕ ♠ ⊕ ♠ ⊕ ♠ ⊕ ♠ ⊕ ♠ ⊕ ♠ ⊕ ♠ ⊕ ♠ ⊕ ♠ ⊕ ♠ ⊕ ♠ ⊕ ♠ ⊕ ♠ ⊕ ♠ ⊕ ♠ ⊕ ♠ ⊕ ♠
git clone 出现错误 Could not resolve host: github.com相关推荐
- git 出现错误 Could not resolve host: github.com 或者 gitlab.com 或者gerrit相关( 自有服务 )...
原来是因为github.com没有被主机给解析 1.第一步是 ping 你的gitlab 或者 github服务器ip地址 如果每隔几秒有 time = xx.ms 刷新 就证明是通的 2. 编辑 e ...
- hexo提交报错 unable to access ‘https://github.com/*/*.github.io.git/‘: Couldn‘t resolve host ‘github.com
title: >- hexo提交报错 unable to access 'https://github.com//.github.io.git/': Couldn't resolve host ...
- 错误集——在线源报未知错误Could not resolve host
在线源报未知错误Could not resolve host 此时为在线源,可以看到报错内容Could not resolve host,无法解析主机,那么这时ping百度试试,ping: www.b ...
- fatal: unable to access ‘https://github.com/.../.git‘: Could not resolve host: github.com解决方法【亲测有效】
fatal: unable to access 'https://github.com/.../.git': Could not resolve host: github.com解决方法 1.问题原因 ...
- git clone 出现fatal: unable to access https://github 解决方法
git clone 出现fatal: unable to access https://github 类错误解决方法 git clone 遇到问题: ① fatal: unable to access ...
- git clone报错 unable to access “https://github.com/xxxxx“
在克隆github其他人代码时,发现报错:fatal: unable to access 'https://github.com/xxxxx/': Failed to connect to githu ...
- 阿里云上git clone公司内网仓库遇到的错误消息 - cannot resolve host
错误消息: cannot resolve host 本地ping之后将ip地址维护到/etc/hosts里,发现错误消息变成了Connection timed out: 要获取更多Jerry的原创文章 ...
- Git解决“Could not resolve host:github.com“
错误方法:向/etc/hosts添加 192.30.253.112 github.com 这个ip地址已经失效了!!! 正确方法 登陆https://www.ipaddress.com,查询最新git ...
- git配置错误 ssh: connect to host github.com port 22: Connection refused
最近学习到版本管理器git,感觉到它的强大之处,但在与远程仓库链接时出现了配置错误问题,所以就整理了一下我的具体解决步骤,不足之处,望大佬指点. 首先要找到一个.ssh文件 .ssh/ 是一个隐藏文件 ...
最新文章
- c++访问控制说明符
- QT: 使用qtchooser修改ubuntu默认的qmake版本
- 批准Oracle IDM中的特定Web服务
- MFC_2.2 编辑框和文本控件
- python数值类型的操作_Python学习笔记,数值类型及操作
- 解决DatePicker中Appbar icon缺失
- vue+three.js开发
- Abseil之New Join API
- 元素查找(xpath)
- Linux安装JDK11
- 【论文阅读笔记】GPT三部曲
- 6.Vue教程:http://www.jb51.net/Special/874.htm
- 记一次锐捷网络虚拟化(VSU)故障处理
- 神经网络学习笔记(一) RBF径向基函数神经网络
- au cs6七线阁教程 笔记
- Educoder -Java面向对象-Java语言之数组(第1关:数组的遍历:给小朋友分糖果)
- pdf工具类之添加页码
- 是否真的输在起跑线上?
- React控制台警告Warning: ReactDOM.render is no longer supported in React 18. Use createRoot instead. Until
- 南昌理工学院计算机科学与技术排名,南昌理工学院排名2018年下滑5名 在民办大学中实力排全国第38名...