- 在有代理设置的电脑上 clone GitHub 仓库时提示:
fatal: unable to access 'https://github.com/fhqfghgdx/Test-github.git/': Failed to connect to github.com port 443: Timed out
- 经分析与收集资料,由于工作机上网需要设置代理,但是GitHub Windows 客户端没有找到网络设置的功能,故网搜如何 GitHub 设置代理,解决如下:
找到 .gitconfig 配置文件,在文件结尾添加:[http] proxy = http://www.proxy.com:port
- 如我的设置:
[http] proxy = http://127.0.0.1:1081
- 设置之后即可正常使用 GitHub clone 或者 commit 代码。
注:
.gitconfig 配置文件位置说明:默认在个人User个人主目录下,是个隐藏文件,如我的 C:\Users\xxxxx\.gitconfig,也可以直接使用 Everything 或者 Listary 在电脑内全局搜索该文件。
本文由 Kevin Yang 发布在 Kevin Yang,转载此文请保持文章完整性,并请附上文章来源(Kevin Yang)及本页链接。
原文链接:https://www.yzj0308.com/%e5%bc%80%e5%90%af%e4%bb%a3%e7%90%86%e5%90%8e%e5%a6%82%e4%bd%95%e4%bd%bf%e7%94%a8github-desktop/
原文链接:https://www.yzj0308.com/%e5%bc%80%e5%90%af%e4%bb%a3%e7%90%86%e5%90%8e%e5%a6%82%e4%bd%95%e4%bd%bf%e7%94%a8github-desktop/