Skip to content

更新插件失败 #45

Answered by nshen
Linya-IronMan asked this question in Q&A
Jun 19, 2022 · 3 comments · 5 replies
Discussion options

You must be logged in to vote

首先确定挂上梯子的时候可以访问 twitter 之类的网站。

然后复制终端代理命令,复制出来的大概是这样

export https_proxy=http://127.0.0.1:1086 http_proxy=http://127.0.0.1:1086 all_proxy=socks5://127.0.0.1:1086

好像还要加上两条 git 代理

  git config --global http.proxy "http://127.0.0.1:1086"
  git config --global https.proxy "http://127.0.0.1:1086"

如果你用 mac 或者某些 linux,就把这些贴到 ~/.bashrc 或者 ~/.zshrc 里就可以了,重开终端后 curl -i cip.cc 看到的应该是你梯子的ip,说明命令行代理成功了。

我的 Mac 下用的这个代码,可以 proxy 和 unproxy 随时切换代理。

# proxy -----------------------------------------------------
alias ip="curl -i cip.cc"
export SOCKS5_ADDR="socks5://127.0.0.1:1086"
export HTTP_ADDR="http://127.0.0.1:1086"
function proxy() {
    export all_proxy="$SOCKS5_ADDR"
    export http_proxy="$HTTP_ADDR"

Replies: 3 comments 5 replies

Comment options

You must be logged in to vote
3 replies
@Linya-IronMan
Comment options

@Linya-IronMan
Comment options

@nshen
Comment options

Answer selected by nshen
Comment options

You must be logged in to vote
2 replies
@jiaxinaoliao
Comment options

@allworldg
Comment options

Comment options

You must be logged in to vote
0 replies
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Category
Q&A
Labels
插件安装问题 插件安装相关问题
5 participants