set HTTP_PROXY=http://proxy-server:port set HTTPS_PROXY=https://proxy-server:port 取消设置: bash set HTTP_PROXY= set HTTPS_PROXY= 4. 测试代理设置是否生效 设置完代理后,你可以尝试使用 git clone 命令来克隆一个远程仓库,以验证代理设置是否生效。例如: bash git clone https://github.com/usern...
复制set http_proxy=http://127.0.0.1:7890set https_proxy=http://127.0.0.1:7890 原理就是让 git clone 的包走 7890 端口发。 这个方法,必须要运行着 clash 才能用(开不开系统代理都可以)。 如果想取消,终端输入: 复制git config--global--unsethttp.proxygit config--global--unsethttps.proxy 复制unset...
git clone 设置临时的 proxy ss.sh #!/bin/env bashBASEDIR=$(dirname"$0")cd$BASEDIRdisable_proxy() { git config --global --unsethttps.proxy }trapdisable_proxy INT git config --global https.proxy http://127.0.0.1:1080 ss-local -c ./config.json config.json {"server":"domain.name","se...
使用git pull拉取github 仓库时,报端口无法连接(2012端口是之前设置的vpn端口),重新设置了新的端口不生效,删除了也不生效 git clone https://github.com/xxxxx/react-template-simple.git Cloning into 'react-template-simple'... fatal: unable to access 'https://github.com/xxxxx/react-template-simple.git...
set http_proxy=http://proxy.yourname.com:8080 其中http://proxy.yourname.com 是你的代理服务器地址,而 8080 是端口号,如果有则设置。另外,如果你的代理服务器要求用户名和密码的话,那么还需要: set http_proxy_user= set http_proxy_pass=
可以发现用 source /data/Tools/proxy.sh test 测试是可以访问国外的google等网站的。但git clone却不行。 这其实是你可能没注意,在wsl中有时候是在普通账户下,有时候进到了root账户下,执行了 source /data/Tools/proxy.sh set。之后在测试代理时,又换了代理地址或端口。
完美解决 fatal: unable to access ' https://github.com/.../.git': Could not resolve host: http://github.com只需要在命令行中执行 git config --global --unset http.proxy git config --global --un…
HTTP 形式:git clonehttps://github.com/PBK-B/test.git SSH 形式:git clone git@github.com:PBK-B/test.git 一、HTTP 形式 走HTTP 代理 git config --global http.proxy "http://127.0.0.1:8080" git config --global https.proxy "http://127.0.0.1:8080" ...
git clone https://gitee.com/devilmaycry812839668/scalable_agent 2. 通过git协议 git clone git@gitee.com:devilmaycry812839668/scalable_agent --- 设置proxy: 1. 为通过http或https协议方式设置proxy:(其中可以再分为http/https代理和sock5代理) http/https代理: git config --global http.proxy http//192...
代码运行次数:0 设置代理sethttp_proxy=socks5://127.0.0.1:1080sethttps_proxy=socks5://127.0.0.1:1080setftp_proxy=socks5://127.0.0.1:1080取消代理sethttp_proxy=sethttps_proxy=setftp_proxy=*设置代理后只对当前命令行窗口生效,重新打开CDM需要再次设置。