LoginSignup
10
12

More than 5 years have passed since last update.

プロキシ制限下でのフロントエンド環境構築メモ(mac)

Last updated at Posted at 2016-02-12

とりいそぎ最新の.bash_profile(随時更新)

bash_profile(2016.05.10)

export ALL_PROXY=$http_proxy // ALL_PROXY(大文字)だとNGになった?

.bash_profile
export http_proxy=http://proxy.myproxy.com:8080
export https_proxy=$http_proxy
export all_proxy=$http_proxy
export PYTHONPATH=/Users/username/.local/lib/python2.7/site-packages
export PATH=/usr/local/bin:$PATH
export ATOM_NODE_URL=http://gh-contractor-zcbenz.s3.amazonaws.com/atom-shell/dist

各種設定

homebrew

環境変数にも

.bash_profile
vi ~/.bash_profile
export http_proxy="http://proxy.myproxy.com:8080"
export https_proxy=$http_proxy
export ALL_PROXY=$http_proxy

npm

zsh
sudo npm -g config set proxy http://proxy.myproxy.com:8080
sudo npm -g config set https-proxy http://proxy.myproxy.com:8080
sudo npm -g config set registry http://registry.npmjs.org/
.npmrc
vi ~/.npmrc
proxy=http://proxy.myproxy.com:8080
https-proxy=http://proxy.myproxy.com:8080

github

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

※globalの.gitconfigを以下のように。

.gitconfig
[http]
    proxy = http://proxy.myproxy.com:8080
[https]
    proxy = http://proxy.myproxy.com:8080
[url "https://"]
    insteadOf = git://

Sublime Text

/Users/USERNAME/Library/Application Support/Sublime Text 3/Packages/User/Package Control.sublime-settings

上記設定ファイルへ以下のように追記する。

{
  "http_proxy": "http://proxy.myproxy.com:8080",
  "https_proxy": "http://proxy.myproxy.com:8080"
}

Atom

.apmrc
vi ~/.atom/.apmrc

https-proxy=http://proxy.myproxy.com:8080
http-proxy=http://proxy.myproxy.com:8080
proxy=https://proxy.myproxy.com:8080/
strict-ssl=false

typing

.typerc
vi ~/.typingsrc

proxy="http://proxy.myproxy.com:8080"
rejectUnauthorized=false

bower

.bowerrc
vi ~/.bowerrc
{
  "proxy" : "http://proxy.myproxy.com:8080",
  "https-proxy" : "http://proxy.myproxy.com:8080"
}

curl

※brew doctorでwarning出るが、

.curlrc
vi ~/.curlrc
proxy = "http://proxy.myproxy.com:8080"

rubygem

zsh
sudo gem install sass -r -p http://proxy.myproxy.com:8080
// のように毎度指定する。
10
12
0

Register as a new user and use Qiita more conveniently

  1. You get articles that match your needs
  2. You can efficiently read back useful information
  3. You can use dark theme
What you can do with signing up
10
12