Proxy設定メモ

毎回ググるのでメモ.

apt

環境変数の利用

export ftp_proxy="ftp://proxy.example.com:8080/"
export http_proxy="http://proxy.example.com:8080/"

/etc/apt/apt.confの利用

最後のセミコロンを忘れて,しばらく動かせなかった...orz

Acquire::ftp::proxy "ftp://proxy.example.com:8080/";
Acquire::http::proxy "http://proxy.example.com:8080/";
Acquire::https::proxy "https://proxy.example.com:8080/";

pip

easy_install

export HTTP_PROXY="http://proxy.example.com:8080/"

pip

pip install [package] --proxy=http://proxy.example.com:8080

git

設定

git config --global http.proxy http://proxy.example.com:8080/
git config --global https.proxy https://proxy.example.com:8080

確認

$ git config --list
user.email=example@xxx.co.jp
user.name=hibitomo
http.proxy=http://proxy.example.com:8080/
https.proxy=https://proxy.example.com:8080/
$ less ~/.gitconfig
[user]
        email = example@xxx.co.jp
        name = hibitomo
[http]
        proxy = http://proxy.example.com:8080/
[https]
        proxy = https://proxy.example.com:8080/

ruby gem

gem install [package] -p http://proxy.example.com:8080/

ruby bundle

環境変数に従う

export http_proxy=http://proxy.example.com:8080/
bundle install

Reference