最新消息: USBMI致力于为网友们分享Windows、安卓、IOS等主流手机系统相关的资讯以及评测、同时提供相关教程、应用、软件下载等服务。

git浏览器可以访问,命令行访问不了

业界 admin 2浏览 0评论

现象:
命令行请求失败。

fatal: unable to access 'https://github/xxx': Failed to connect to github port 443: Timed out

解决:
方法一(mac)host添加代理:

sudo vim /etc/host ,添加如下内容
ip 域名
10.3.3.33 xxxx.ck

方法二 git 添加代理:

设置代理
git config --global http.proxy '10.3.3.33:33' 
git config --global https.proxy '10.3.3.33:33'
查看代理
git config --global --get http.proxy
git config --global --get https.proxy
取消代理
git config --global --unset http.proxy
git config --global --unset https.proxy

现象:
命令行请求失败。

fatal: unable to access 'https://github/xxx': Failed to connect to github port 443: Timed out

解决:
方法一(mac)host添加代理:

sudo vim /etc/host ,添加如下内容
ip 域名
10.3.3.33 xxxx.ck

方法二 git 添加代理:

设置代理
git config --global http.proxy '10.3.3.33:33' 
git config --global https.proxy '10.3.3.33:33'
查看代理
git config --global --get http.proxy
git config --global --get https.proxy
取消代理
git config --global --unset http.proxy
git config --global --unset https.proxy
发布评论

评论列表 (0)

  1. 暂无评论