【问题标题】:Using Vundle behind Proxy在代理后面使用 Vundle
【发布时间】:2015-10-04 03:54:27
【问题描述】:

我们有这个简洁的小脚本在工作,让我们通过 linux 环境的代理使用互联网。例如

withproxy git clone https://github.com/VundleVim/Vundle.vim.git

工作正常,甚至不提示我输入用户名和密码。

如何在 .vimrc 中为 Vundle 设置它,以便所有 git 事物都以此代理脚本为前缀?

【问题讨论】:

  • 你试过用代理脚本运行 vim 吗?

标签: git vim proxy vundle


【解决方案1】:

如何在 Vundle 的 .vimrc 中设置它,以便所有 git 事物都以此代理脚本为前缀?

你没有。你要做的是让git 通过代理:

git config --global http.proxy http://username:password@proxy.example.com:8080

你也可以将环境变量http_proxy设置成同样的东西:

export http_proxy='http://username:password@proxy.example.com:8080'

如果您这样做,您可能还需要https_proxy

【讨论】:

  • 对于 socks 代理,只需在 vim 命令前添加 ALL_PROXY=socks5://127.0.0.1:1080 即可。见,using-a-socks-proxy-with-git-for-the-http-transport。例如,我使用vim-plug:PlugInstall 来安装wakatime/vim-wakatime。我尝试了ALL_PROXY=socks5://127.0.0.1:8888 vim,然后在vim 中运行:PlugInstallvim-plug 将使用socks 代理。它对我有用。
猜你喜欢
  • 2016-08-06
  • 2013-02-24
  • 1970-01-01
  • 1970-01-01
  • 1970-01-01
  • 1970-01-01
  • 2015-11-10
  • 2012-12-24
  • 2012-10-21
相关资源
最近更新 更多