LoginSignup
9
2

More than 1 year has passed since last update.

認証プロキシ環境下でJavaScript開発をする際の設定

Last updated at Posted at 2019-06-18

※ 加筆修正したものをブログにあげなおしています。※


毎回ググって設定しているので、備忘録としてまとめておきます。
※パスワード変更をしたらその都度設定しなおしが必要です(パスワードの定期変更強制やめてほしい)。

Node.js

npmできるようにするための設定。

config設定

以下のコマンドを実行します。

npm config set proxy http://<ユーザーID>:<パスワード>@<認証プロキシホスト名>:<ポート番号>
npm config set https-proxy http://<ユーザーID>:<パスワード>@<認証プロキシホスト名>:<ポート番号>

Git

Gitも使えないと困るのであわせて設定。

git config --global http.proxy http://<ユーザーID>:<パスワード>@<認証プロキシホスト名>:<ポート番号>
git config --global https.proxy http://<ユーザーID>:<パスワード>@<認証プロキシホスト名>:<ポート番号>

ほぼ同じですね。

ハマりポイント

認証プロキシのパスワードに%が含まれているとうまくいきません。
%の部分を%25にしましょう。

まとめ

認証プロキシとパスワード定期変更強制は悪。

9
2
1

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
9
2