Git 克隆不工作 - 错误 443
声明:本页面是StackOverFlow热门问题的中英对照翻译,遵循CC BY-SA 4.0协议,如果您需要使用它,必须同样遵循CC BY-SA许可,注明原文地址和作者信息,同时你必须将它归于原作者(不是我):StackOverFlow
原文地址: http://stackoverflow.com/questions/15908802/
Warning: these are provided under cc-by-sa 4.0 license. You are free to use/share it, But you must attribute it to the original authors (not me):
StackOverFlow
Git clone not working - error 443
提问by gregwhitworth
I am working from home and am trying to clone a repo from Github and am getting the following error:
我在家工作并试图从 Github 克隆一个 repo 并收到以下错误:
git clone https://github.com/account/repo.git
Also tried
也试过
git clone git://github.com/account/repo.git
Error: Failed connect to github.com:443; No error while accessing https://github.com/account/repo/info/refs?service=git-upload-pac
fatal: HTTP request failed
I even tried to use SSH and this is what I get:
我什至尝试使用 SSH,这就是我得到的:
ssh: connect to host github.com port 22: Bad file number fatal: could not read from remote repository.
ssh:连接到主机 github.com 端口 22:错误的文件号致命:无法从远程存储库读取。
I was just able to clone it on my laptop so I know that I have the correct permissions, I just need help trying to figure out why this is happening on my desktop and it seems that all of the other suggestions don't seem to be working.
我只是能够在我的笔记本电脑上克隆它,所以我知道我拥有正确的权限,我只是需要帮助试图弄清楚为什么我的桌面上会发生这种情况,而且似乎所有其他建议似乎都不是在职的。
- I am not using a proxy.
- I cannot do pulls on other repos that already exist either.
- 我没有使用代理。
- 我也不能对已经存在的其他存储库进行拉取。
EDITOk I ran the command suggested, here are the results:
编辑好的,我运行了建议的命令,结果如下:
$ ssh -i ~/.ssh/id_rsa -vvv [email protected]
OpenSSH_4.6p1, OpenSSL 0.9.8e 23 Feb 2007
debug2: ssh_connect: needpriv 0
debug1: Connecting to github.com [204.232.175.90] port 22.
debug1: connect to address 204.232.175.90 port 22: Not owner
ssh: connect to host github.com port 22: Bad file number
Any suggestions?
有什么建议?
采纳答案by gregwhitworth
I know this may be general but I decided I wanted to get this answered, so here is what I did and it is now working correctly:
我知道这可能是一般性的,但我决定要回答这个问题,所以这是我所做的,现在它可以正常工作:
- Uninstalled ALL git clients through windows (I had a couple initially for testing)
- Installed the basic git bash from git
- Turned off smart screen and ensured firewall and defender were off (they were)
- 通过 Windows 卸载所有 git 客户端(我最初有几个用于测试)
- 从git安装了基本的 git bash
- 关闭智能屏幕并确保防火墙和防御者关闭(他们是)
Tried it again and it now works. My best guess is there was a mis-configuration somewhere - probably a wrong key (not sure how that happened since I updated it). At any rate it is working. It's probably the nuclear option but I hope this helps someone else that runs into this.
再次尝试,现在可以使用了。我最好的猜测是某处配置错误 - 可能是错误的密钥(不确定自从我更新它后是怎么发生的)。无论如何它正在起作用。这可能是核选项,但我希望这可以帮助遇到此问题的其他人。
回答by dghadge
I could resolve the 443 error by issuing this command :
我可以通过发出以下命令来解决 443 错误:
git config --global http.proxy <proxyname:port>
回答by Mahmoodvcs
Usually this means that your network is protected by a proxy server. To config git to use proxy, use this command:
通常这意味着您的网络受到代理服务器的保护。要将 git 配置为使用代理,请使用以下命令:
git config --global http.proxy <http[s]://userName:password@proxyaddress:port>
if the proxy server doesn't have username and passeord, use this command
如果代理服务器没有用户名和密码,请使用此命令
git config --global http.proxy <proxyaddress:port>