文章目录:

  • 1 问题出现的原因
    • 1.1 问题描述
    • 1.2 尝试解决问题
  • 2 解决错误:Received HTTP code 503 from proxy after CONNECT
    • 2.1 我遇到这个错误的原因
    • 2.2 解决错误
    • 2.3 彻底的根除这个错误,防止下次再遇到
  • 3 其他遇到同样错误的情况

1 问题出现的原因

1.1 问题描述

我在使用git clone克隆某个项目的时候报错:Received HTTP code 503 from proxy after CONNECT,具体信息如下

zhihui@zhihui-desktop:~/yolov4-deepsort/checkpoints$ git clone https://github.com/onnx/tensorflow-onnx.git
Cloning into 'tensorflow-onnx'...
fatal: unable to access 'https://github.com/onnx/tensorflow-onnx.git/': Received HTTP code 503 from proxy after CONNECT
zhihui@zhihui-desktop:~/yolov4-deepsort/checkpoints$ git clone https://github.com.cnpmjs.org/onnx/tensorflow-onnx.git --config http.proxy= --config http.sslVerify=false
Cloning into 'tensorflow-onnx'...
remote: Enumerating objects: 79, done.
remote: Counting objects: 100% (79/79), done.
remote: Compressing objects: 100% (65/65), done.
remote: Total 10847 (delta 43), reused 35 (delta 14), pack-reused 10768
Receiving objects: 100% (10847/10847), 21.12 MiB | 1.88 MiB/s, done.
Resolving deltas: 100% (8096/8096), done.
zhihui@zhihui-desktop:~/yolov4-deepsort/checkpoints$ 

1.2 尝试解决问题

各种google、最后还尝试了百度,大多给出的解决方法都是类似,主要解决方法在这里

1、方法一:修改git的配置文件

vim ~/.gitconfig

然后添加如下信息:

[https]sslVerify = falseproxy = https://proxy.corpadderess:8080
[http]sslVerify = falseproxy = http://proxy.corpadderess:8080

2、方法二:设置git参数

git clone <addr of repo> --config http.proxy= --config http.sslVerify=false

你们可以尝试,也许对你有用,只不过没有解决我的问题

2 解决错误:Received HTTP code 503 from proxy after CONNECT

2.1 我遇到这个错误的原因

后面我想到,我之前尝试安装vpn,在某个配置文件中添加了代理,这是我遇到这个问题的罪魁祸首(其实我的vpn也没

查看有没有使用代理

env | grep -I proxy

2.2 解决错误

解决这个错误就是要:取消我们设置代理(更多代理相关参考我的这篇博客)

使用unset命令取消代理

$ unset https_proxy
$ unset http_proxy
$ unset ftp_proxy

2.3 彻底的根除这个错误,防止下次再遇到

我是在/etc/profile这个文件中添加的代理,最下面的三行是我添加的代理,删除即可!

zhihui@zhihui-desktop:~/onnx-tensorrt/build$ cat /etc/profile
# /etc/profile: system-wide .profile file for the Bourne shell (sh(1))
# and Bourne compatible shells (bash(1), ksh(1), ash(1), ...).if [ "${PS1-}" ]; thenif [ "${BASH-}" ] && [ "$BASH" != "/bin/sh" ]; then# The file bash.bashrc already sets the default PS1.# PS1='\h:\w\$ 'if [ -f /etc/bash.bashrc ]; then. /etc/bash.bashrcfielseif [ "`id -u`" -eq 0 ]; thenPS1='# 'elsePS1='$ 'fifi
fiif [ -d /etc/profile.d ]; thenfor i in /etc/profile.d/*.sh; doif [ -r $i ]; then. $ifidoneunset i
fi# 把下面自己添加的三行代理删除
export http_proxy=http://127.0.0.1:8118
export https_proxy=http://127.0.0.1:8118
export ftp_proxy=http://127.0.0.1:8118

3 其他遇到同样错误的情况

以下的情况也都是由于这个代理导致的:

  • 1)使用pip安装库包,同样会报503错误
zhihui@zhihui-desktop:~/onnx-tensorrt/build$ pip install onnx==1.6.0 -i https://pypi.douban.com/simple
Defaulting to user installation because normal site-packages is not writeable
Looking in indexes: https://pypi.douban.com/simple
WARNING: Retrying (Retry(total=4, connect=None, read=None, redirect=None, status=None)) after connection broken by 'ProxyError('Cannot connect to proxy.', OSError('Tunnel connection failed: 503 Forwarding failure',))': /simple/onnx/
WARNING: Retrying (Retry(total=3, connect=None, read=None, redirect=None, status=None)) after connection broken by 'ProxyError('Cannot connect to proxy.', OSError('Tunnel connection failed: 503 Forwarding failure',))': /simple/onnx/
WARNING: Retrying (Retry(total=2, connect=None, read=None, redirect=None, status=None)) after connection broken by 'ProxyError('Cannot connect to proxy.', OSError('Tunnel connection failed: 503 Forwarding failure',))': /simple/onnx/
WARNING: Retrying (Retry(total=1, connect=None, read=None, redirect=None, status=None)) after connection broken by 'ProxyError('Cannot connect to proxy.', OSError('Tunnel connection failed: 503 Forwarding failure',))': /simple/onnx/
WARNING: Retrying (Retry(total=0, connect=None, read=None, redirect=None, status=None)) after connection broken by 'ProxyError('Cannot connect to proxy.', OSError('Tunnel connection failed: 503 Forwarding failure',))': /simple/onnx/
ERROR: Could not find a version that satisfies the requirement onnx==1.6.0 (from versions: none)
ERROR: No matching distribution found for onnx==1.6.0
zhihui@zhihui-desktop:~/onnx-tensorrt/build$ git configg --global http:;roxy
  • 2)使用git submodule update下载子仓库也报同样的错误:Received HTTP code 503 from proxy after CONNECT
zhihui@zhihui-desktop:~/onnx-tensorrt$ git submodule update --init --recursive
Submodule 'third_party/onnx' (https://github.com/onnx/onnx.git) registered for path 'third_party/onnx'
Cloning into '/home/zhihui/onnx-tensorrt/third_party/onnx'...
fatal: unable to access 'https://github.com/onnx/onnx.git/': Received HTTP code 503 from proxy after CONNECT
fatal: clone of 'https://github.com/onnx/onnx.git' into submodule path '/home/zhihui/onnx-tensorrt/third_party/onnx' failed
Failed to clone 'third_party/onnx'. Retry scheduled
Cloning into '/home/zhihui/onnx-tensorrt/third_party/onnx'...
fatal: unable to access 'https://github.com/onnx/onnx.git/': Received HTTP code 503 from proxy after CONNECT
fatal: clone of 'https://github.com/onnx/onnx.git' into submodule path '/home/zhihui/onnx-tensorrt/third_party/onnx' failed
Failed to clone 'third_party/onnx' a second time, aborting
zhihui@zhihui-desktop:~/onnx-tensorrt$ cd ..

使用git clone的时候报错:Received HTTP code 503 from proxy after CONNECT相关推荐

  1. Received HTTP code 503 from proxy after CONNECT

    用git clone下载时,总是出现错误.Received HTTP code 503 from proxy after CONNECT.自己不爱看英文,其实自己能静下心来把英文读懂了,多尝试,问题就 ...

  2. Clone from GitHub with Git extension shows: Received HTTP code 407 from proxy after CONNECT(Git 代理)

    Clone from GitHub with Git extension shows: Received HTTP code 407 from proxy after CONNECT(Git 代理) ...

  3. npm下载报错npm ERR! code ETIMEDOUT npm ERR! syscall connect npm ERR! errno ETIMEDOUT npm ERR! network re

    一.npm下载报错信息如下 二.试了网上搜的很多方法如下(我的不行不代表你的不行,大家也可以试一下下面的方法) 1.设置代理关闭 npm config set proxy false 2.清除缓存 n ...

  4. Received HTTP code 404 from proxy after CONNECT

    错误提示 fatal: unable to access 'https://gitee.com/xxxxx.got/':Received HTTPcode 404 from proxy after C ...

  5. 使用Git克隆vue-element-admin项目报错的解决方案

    使用Git克隆vue-element-admin项目报错的解决方案 使用Git克隆vue-element-admin项目报错 使用Git克隆vue-element-admin项目报错 当我们使用git ...

  6. git push 报错 Empty reply from server 或 Failed to connect to github.com port 443: Time out

    git push 报错 Empty reply from server 或 Failed to connect to github.com port 443: Time out 问题出现 报错信息 问 ...

  7. git push origin master报错的解决方法 常见git命令(待更新)

    git push origin master报错的解决方法 & 常见git命令(待更新) 参考Git常用命令 文章目录 git push origin master报错的解决方法 & ...

  8. git clone的时候报error: RPC failed; result=18错误

    因业务需求,需要把内网gitlab仓库的地址对外网访问,在gitlab前端配置了一个nginx代理服务器,来实现需求,可以在git clone的时候报error: RPC failed错误 [root ...

  9. git push github SSL报错处理

    本文仅供学习交流使用,如侵立删!demo下载见文末 git push github SSL报错 问题:OpenSSL SSL_connect: SSL_ERROR_SYSCALL in connect ...

最新文章

  1. 配置Trunk实现相同Vlan通信
  2. Git GUI使用(二)
  3. java基础之堆、栈、方法区 继承 多态
  4. asm 比 ucontext 快
  5. 动态存储和静态存储区域区别
  6. mysql结果行数_取得数据库结果集中的行数
  7. 关于ajax入门案例
  8. ASP.NET 配置概览
  9. 18.MongoDB之balancer
  10. 190509每日一句
  11. java虚拟机有什么作用_java虚拟机有什么用
  12. 移动边缘计算中的资源管理
  13. Flask(6):Flask的闪现+Flask的蓝图
  14. android 删除垃圾文件夹,Android手机里的垃圾文件和文件夹清理
  15. css3 模糊渐变,css3实现背景色渐变linear-gradient()
  16. spark.jars.packages使用镜像源加速
  17. RTX 3060Ti和rtx2080Super的区别
  18. vue table自定义样式
  19. 全球与中国N-苯基马来酰亚胺粉市场深度研究分析报告
  20. 精选上万个(cc协议)游戏素材,一键下载

热门文章

  1. linux 查看端口使用情况
  2. android 点击扩散,Android水波纹扩散效果
  3. 上海交通大学c语言章节作业,上海交通大学级C语言测试题.doc
  4. python入门教程书籍-初学者最好的Python书籍
  5. python画折线图代码-Python折线图的分析过程和画图的方法
  6. python一个月能学成嘛-学过 Python 的人没有告诉你,年入百万有多难
  7. python安卓版汉化版-手机随时随地写Python,还可以开发安卓APP,太厉害了!
  8. python初学者代码-Python-为什么Python是初学者的完美选择?
  9. python编程入门经典教程-2020年5个经典python编程入门视频教程推荐学习
  10. python就业前景-Python就业前景分析