0
0

Delete article

Deleted articles cannot be recovered.

Draft of this article would be also deleted.

Are you sure you want to delete this article?

More than 3 years have passed since last update.

IBM Cloud CLI をProxy経由で利用する

Last updated at Posted at 2022-05-18

インターネットに直接接続していない環境からProxy経由でIBM Cloud CLIを利用する場合の設定方法を紹介します。

LinuxおよびWindows 10についてはProxy用の環境変数を変更することで、ログイン認証およびコマンド実行がProxy経由で可能でした。

Linux

Linux環境変数の設定方法(認証が不要な場合)

export https_proxy=http://<proxy_host>:<proxy_port>
export http_proxy=http://<proxy_host>:<proxy_port>

設定確認方法

printenv https_proxy
printenv http_proxy

Windows 10

Windows用インストーラーを用いた場合、PowershellもしくはコマンドプロンプトでIBM Cloud CLIが利用できるようになります。

一時的にProxy経由で通信する場合

下記コマンドを実行する

set https_proxy=http://<proxy_host>:<proxy_port>
set http_proxy=http://<proxy_host>:<proxy_port>

恒久的にproxy経由で通信する場合

環境変数を変更してWindowsを再起動する

コントロールパネル > システム > システムの詳細設定 > 詳細設定タブ > 環境変数 > システム環境変数

image.png

「コンピューターのプロキシ設定」を利用した場合

Microsoft Edge や Chrome のブラウザのProxy設定を行う際には「コンピューターのプロキシ設定」を利用しますが、「コンピューターのプロキシ設定」を行ったとしてもPowershellもしくはコマンドプロンプトの通信はProxy経由となりませんでした。

スタート > 設定 > プロキシ > 手動プロキシ セットアップ
(edge://settings/system > システムとパフォーマンス > コンピューターのプロキシ設定を開く)

参考URL

これからIBM Cloud CLIをインストールする方へ
https://qiita.com/ayatokura/items/013bdc614a1fa30a0cc0

Windows10のプロキシ(Proxy)設定を完全削除する為の設定箇所一覧
https://qiita.com/hiren/items/01a26d5a47ff13d623fa

0
0
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
0
0

Delete article

Deleted articles cannot be recovered.

Draft of this article would be also deleted.

Are you sure you want to delete this article?