Cmder如何设置代理
💣

Cmder如何设置代理

Tags
cmder
代理
科学上网
git
description
在cmder || bash 跑 git clone 报错 SSL连接失败怎么办
更新时间
Last updated February 6, 2022
由于有时候github.com会被墙,所以如果直接git clone 可能会失败
即使我们开了科学上网,但是如果cmder没有设置代理的话依然是不行的。
 
设置代理的方法
  1. 在cmder内部
Set http_proxy=http://[proxy]:[port] Set https_proxy=http://[proxy]:[port]
  1. 在bash里或者bash模式下
export http_proxy=http://[proxy]:[port] export https_proxy=http://[proxy]:[port]
  1. 在PowerShell里
$env:http_proxy=http://[proxy]:[port] $env:https_proxy=http://[proxy]:[port]
 
注意, 代理的端口可能找的不对,比如V2ray设置中的端口为10808,但是这个指的是socket5对应的端口,http端口对应为10809,可以通过控制台最下面查看
notion image