Git-fatal: unable to access ‘https://gitlab.XX.git/‘: Could not resolve host: gitlab.XX.com.cn
克隆,提交代码 时报错如下:
fatal: unable to access 'https://gitlab.XX.git/': Could not resolve host: gitlab.XX.com.cn
其中XX为你的项目地址域名
一、Git设置取消代理
因为公司网走的代理,git需要设置代理,才能git clone成功
$ git config --global http.proxy XX.XXX.0.103:8080$ git config --global https.proxy XX.XXX.0.103:8080
但是提交代码时还是报这个错,这时候又需要取消代理,取消代理命令
git config --global --unset http.proxy git config --global --unset https.proxy
二、绑定本机IP地址访问
1、获取本机IP地址
Windows系统下命令 ipconfig
Mac下命令 ifconfig
2、ping一下IP地址,ping IP地址;需要连接正常即可
如果一直在输出,按住control + C即可
3、找到git目录下的 hosts文件
(1)Windows下一般目录为 C:\Program Files\Git\etc
(2)Mac下 通过shift+command+g(前往文件夹)快速搜索框,然后输入 /etc/hosts 即可查找到对应的hosts文件
扩充:Mac下修改hosts文件 ,两种方式
(1)找到文件后点击用文本打开,会发现类似复制一份的提示,这样的话,我们可以把这个文件复制到桌面,对其进行修改,然后用修改后的文件把原来的文件替换掉,这个过程需要账号和密码。
(2)使用终端进行修改: sudo vi /etc/hosts 对文档进行编辑,在编辑时,点击a进入编辑模式,编辑后,进行保存和退出。快捷键为:【:WQ!】这样就保存和退出了。
具体可参考文章 Mac-系统hosts文件
4、在该文件下 添加 192.168.0.108 github.com
此处的IP 替换为自己的IP即可
Git-fatal: unable to access ‘https://gitlab.XX.git/‘: Could not resolve host: gitlab.XX.com.cn相关推荐
- Git ----fatal: unable to access ‘https://gitee.com/***.git/‘: SSL certificate problem: unable
fatal: unable to access 'https://gitee.com/gzllkm/GZL.git/': SSL certificate problem: unable to get ...
- 解决git下载报错:fatal: unable to access ‘https://github.com/.../.git/‘:
解决git下载报错:fatal: unable to access 'https://github.com/-/.git/':- 1.在git中执行git config --global --unse ...
- 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.问题原因 ...
- fatal: unable to access ‘https://github.com/***.git/‘: OpenSSL SSL_read: Connection was reset, errno
写了点code,想交到GitHub,结果报了个错. fatal: unable to access 'https://github.com/koking0/Algorithm.git/': OpenS ...
- fatal: unable to access ‘https://gitee.com/****/****.git/‘: The requested URL returned error
mac 拉取服务器代码到本地时报错 git clone 的时候报错,百度很久没有找到答案,权限已经配置好的了,这个是前提哦. 后来才发现是clone的地址搞错了,gitee 默认的地址是HTTPS的, ...
- fatal: unable to access ‘https://github.com/xx/xx.git/’: Failed to connect to github.com port 443: T
github提交代码时报错: fatal: unable to access 'https://github.com/xx/xx.git/': Failed to connect to github. ...
- fatal: unable to access ‘https://github.com/xxx/123.git/‘: Failed connect to github.com:443 解决方案
在linux上git clone时遇到 fatal: unable to access 'https://github.com/xx/xx.git/': Failed connect to githu ...
- git的clone命令出现fatal:unable to access ‘https://github.comXXXXXXX“:OpenSSL SSL_read:connection was errn
git使用git clone命令时出现错误fatal:unable to access 'https://github.comXXXXXXX":OpenSSL SSL_read:connec ...
- 【git clone 报错】fatal: unable to access ‘https://github.com/zimeng303/React.git/‘: Failed to connect
[git clone 报错]fatal: unable to access 'https://github.com/zimeng303/React.git/': Failed to connect t ...
- git clone 出现fatal: unable to access ‘https://github 类错误解决方法
git clone 遇到问题:fatal: unable to access 'https://github.comxxxxxxxxxxx': Failed to connect to xxxxxxx ...
最新文章
- mysql数据库中nchar_MySQL数据库中CHAR与VARCHAR之争
- iOS Class结构分析
- mac android手机调试,mac os开发android应用通过usb真机调试
- Flask flask-session
- ThreadLocal设计
- 为什么rocketmq的queue分为读写?_分布式发布订阅消息系统Kafka 为什么快
- 从零基础入门Tensorflow2.0 ----三、8. 自定义层次
- linux读usb转ttl串口数据,ubuntu16.04使用USB转TTL(ch340)串口转usb调试过程
- 测试显卡用什么软件最好,显卡测试用什么软件 怎么测试显卡性能
- python获取股票分时数据_AkShare-股票数据-分时数据
- en开头的单词_【2016年大学英语四级考试词汇常见前后缀:en-】- 环球网校
- PRD之道:活用Axure快速撰写轻便的需求文档
- python语句中print(type(1j))_Python语句 print(type(1/2))的输出结果是:______
- jQuery 一次定时器_记一次腾讯微信面试
- uniapp的uniapp navigateTo 点击无法跳转的问题
- python显示gif图片_Python给gif图片加文字水印
- kill和killall的区别
- 美创科技深度参编的《数据安全治理实践指南(2.0)》发布
- 中心差商公式不同的h计算近似一(二)阶导数
- 解决idea打不开的两种可能性