Failed connect to github.com:443; No error

简介: 任务目标:将线上已有的https://github.com/eyjian/mooon.git克隆到本地的E:\GitHub\mooon目录 问题描述:使用Git的Windows客户端UI工具GitHub执行克隆操作时报错,查看它的日志,难发现问题,于是改用Git的Windows命令行终端Git Shell操作,得到了较为详细的错误信息,基于错误提示解决了问题,过程描述如下。
任务目标:将线上已有的 https://github.com/eyjian/mooon.git克隆到本地的E:\GitHub\mooon目录
问题描述:使用Git的Windows客户端UI工具GitHub执行克隆操作时报错,查看它的日志,难发现问题,于是改用Git的Windows命令行终端Git Shell操作,得到了较为详细的错误信息,基于错误提示解决了问题,过程描述如下。

打开Git Shell,进入本地的E:\GitHub目录,注意不是E:\GitHub\mooon目录,然后执行克隆命令git clone如下:
E:\GitHub> git clone https://github.com/eyjian/mooon.git
Cloning into 'mooon'...
fatal: unable to access ' https://github.com/eyjian/mooon.git/': Failed connect to github.com:443; No error

遇到错误,克隆失败。通过执行telnet github.com 443,发现网络不通,于是想到设置代理,通过baidu找到设置proxy方法:
1) 打开文件.gitconfig,文件位于用户主目录下,执行ls ~即可看到它。假设Win7登录用户名为tom,则位于C:\Users\tom目录下
2)编辑.gitconfig,在文件尾加入以下内容:
[http]
    proxy = http://www.proxy.com:8080/

[http]顶格写,proxy前保留一个tab,其中www.proxy.com为代理服务器的IP或域名。
完成后,再次执行git clone  https://github.com/eyjian/mooon.git,发现成功了。。。

对文件.gitconfig的操作,实际可以借助git命令来完成,而不必直接编辑.gitconfig,对应的子命令是git config --global,如:git config --global user.name "eyjian",则在.gitconfig文件中可以看到如下内容:
[user]
    name = eyjian

同理,配置proxy命令为:git config --global http.proxy  http://www.proxy.com:8080/

相关文章
|
3月前
|
网络安全 开发工具 git
解决fatal:remote error:You can’t push to git://github.com/username/*.g
通过上述诊断与修复步骤,绝大多数的推送错误都能得到有效解决,确保您的Git工作流顺畅无阻。
297 1
|
6月前
|
网络协议 Shell 网络安全
ssh: connect to host github.com port 22: Connection refused
本文讨论了在使用Git命令操作GitHub时遇到的"ssh: connect to host github.com port 22: Connection refused"错误,分析了可能的原因,并提供了使用443端口或https协议作为解决方案,最终确定问题是由于DNS解析错误导致,通过修改hosts文件解决。
ssh: connect to host github.com port 22: Connection refused
|
6月前
|
开发工具 git
GitHub——Error: Process completed with exit code 126.
GitHub——Error: Process completed with exit code 126.
120 1
GitHub——Error: Process completed with exit code 126.
|
6月前
|
存储 开发工具 数据安全/隐私保护
解决Gitee或者Github出现Access denied fatal: unable to access,The requested URL returned error: 403
解决Gitee或者Github出现Access denied fatal: unable to access,The requested URL returned error: 403
1178 0
|
7月前
|
网络安全 开发工具 git
【git】解决git报错:ssh:connect to host github.com port 22: Connection timed out 亲测有效
【git】解决git报错:ssh:connect to host github.com port 22: Connection timed out 亲测有效
2461 1
|
8月前
|
开发工具 git
【已解决】error: failed to push some refs to ‘git@github.com:BATdalao/Github-green.git‘
【已解决】error: failed to push some refs to ‘git@github.com:BATdalao/Github-green.git‘
|
8月前
|
开发工具 git
出现“error: failed to push some refs to ‘https://github.com/****.git‘”,如何解决问题
出现“error: failed to push some refs to ‘https://github.com/****.git‘”,如何解决问题
943 1
|
9月前
|
Web App开发 缓存 开发工具
Failed to connect to github.com port 443: Operation timed out和弹出无法打开"GoogleSoftwareUpdate.bundle"
Failed to connect to github.com port 443: Operation timed out和弹出无法打开"GoogleSoftwareUpdate.bundle"
143 2
|
9月前
|
网络虚拟化
解决方案:Github Failed to connect to github.com port 443 after 21224 ms: Timed out
解决方案:Github Failed to connect to github.com port 443 after 21224 ms: Timed out
278 0
|
9月前
|
Linux 开发工具 git
【开发专题_03】unable to access ‘https://github.com/deviantony/docker-elk.git/‘: Failed connect to github
【开发专题_03】unable to access ‘https://github.com/deviantony/docker-elk.git/‘: Failed connect to github
164 2

热门文章

最新文章