【git clone出现连接被拒绝的问题】

  • Post author:
  • Post category:其他






问题描述

当我从github上拉取vue-admin-template项目模板时代码时报如下错误

$ git clone https://github.com/PanJiaChen/vue-admin-template.git hrsaas
Cloning into 'hrsaas'...
fatal: unable to access 'https://github.com/PanJiaChen/vue-admin-template.git/':
 Failed to connect to 127.0.0.1 port 31181 after 2043 ms: Connection refused



原因分析:

经过排查出现上述错误的原因是使用了proxy代理




解决方案:

要解决上述问题,核心操作是要取消代理

1.先查看有没有使用代理

git config --global http.proxy

2.取消代理设置

git config --global --unset http.proxy



版权声明:本文为weixin_53500514原创文章,遵循 CC 4.0 BY-SA 版权协议,转载请附上原文出处链接和本声明。