Proxy Zscaler 証明書対策 まとめ

それぞれの機能で対応方法が異なるので、都度まとめています。 まだやっていないものもあるので抜けはありますが、わかった時点で追加したいと思います。

一覧

コマンドProxyエラー内容
対応方法
証明書
*フルパスで記述
npmProxy【対応方法】
Windows ユーザー環境変数に設定
set HTTPS_PROXY=”proxy_address:port_number”
set HTTPS_PROXY=”proxy_address:port_number


Linuxはsetでなくexport
Zscaler【対応方法】
npmrc環境変数
npm config set proxy http://gateway.zscaler.net:80/
npm config set https-proxy http://gateway.zscaler.net:80/
*zscalerのアドレスとポート番号は一例です。
set NODE_EXTRA_CA_CERTS=証明書ファイル
pipProxyThere was a problem confirming the ssl certificate: HTTPSConnectionPool(host=’pypi.org’, port=443): Max retries exceeded with url: /simple/pip/ (Caused by SSLError(SSLCertVerificationError(1, ‘[SSL: CERTIFICATE_VERIFY_FAILED]
certificate verify failed: unable to get local issuer certificate (_ssl.c:1122)’))) – skipping

【対応方法】
Windows ユーザー環境変数
set HTTPS_PROXY=”proxy_address:port_number”
set HTTPS_PROXY=”proxy_address:port_number”

Linux 環境変数
export http_proxy=http://user:password@proxy_url:proxy_por
export https_proxy=http://user:password@proxy_url:proxy_por

■他の方法
pip.iniにproxy =address:portを設定
pipコマンドに –proxyオプションでaddress:port指定
pip.iniファイル
[global]
cert = C:\Users\user_name\venv\MyCert.pem

verify=証明書ファイル
pythonProxy./certifi/cacert.pemにサイトの証明書を付け足す。

———-他のサイトでは—————–
> verify の時
Windows 環境変数 REQUESTS_CA_BUNDLE
condaProxy【対応方法】
.condarcファイルに設定
proxy_servers:
http: http://user:password@proxy_url:proxy_port
https: http://user:password@proxy_url:proxy_port
jupyter【対応方法】
kernel.jsonに設定

“env”: {
“HTTP_PROXY”: “http://user:password@proxy.hoge.jp:port”,
“HTTPS_PROXY”: “http://user:password@proxy.hoge.jp:port”,
“FTP_PROXY”: “http://user:password@proxy.hoge.jp:port”
},
aws cliProxy[SSL: CERTIFICATE_VERIFY_FAILED] certificate verify failed: unable to get local issuer certificate (_ssl.c:1091)

【対応方法】
Windows ユーザー環境変数
set HTTPS_PROXY=”proxy_address:port_number”
set HTTPS_PROXY=”proxy_address:port_number”
環境変数 AWS_CA_BUNDLE

.aws/config の ca_bundle
gitProxy
zscaler
Could not resolve proxy: proxy._ _ _.co.jp
【対応方法】
.gitconfig の [http]
git config –global http.proxy http://proxy._ _ _.co.jp:8080
或いは
git config –global http.proxy http://gateway.zscaler.net:80

git config –global -l で設定一覧表示

*gitconfig内の[http]内に,
sslVerify = trueの設定があるので、https設定は無い。
SSL certificate problem: unable to get local issuer certificate

.gitconfig の sslCAInfoに設定

git config –global http.sslcainfo 証明書のフルパス

URLごとの設定にする場合
git config –global http..sslcainfo 証明書のフルパス
gitProxy
zscaler
【対応方法】
.gitconfig ファイルに設定
[http]
proxy = https://(your-proxy-address-or-domain):(port)
sslCAInfo = D:\data\cert\ca_bundle.pem
[http “https://(intranet-webserver-1-domain)”]
sslCAInfo = D:\data\cert\cert-from-webserver-1.pem
htts.proxyは存在しない
aptProxy【対応方法】
/etc/apt/apt.confに設定
Acquire::http::Proxy “http://:“;
Acquire::https::Proxy “http://:“;

Docker内での使用の場合の例:
{
“proxies”:
{
“default”:
{
“httpProxy”: “http://example.proxy.co.jp:8080”,
“httpsProxy”: “http://example.proxy.co.jp:8080”,
“noProxy”: “localhost,127.0.0.1/8”
}
}
}
wgetProxy【対応方法】
/etc/wgetに記述
https_proxy = :
http_proxy = :
ftp_proxy = :
curlProxy【対応方法】
~/.curlrcに設定
proxy=http://:
VScodeProxy
zscaler
【対応方法】
VScodeのsettingsのProxyのフィールドに以下のどちらかを記述する。
http://ユーザー名:パスワード@example.proxy.co.jp:8080

http://gateway.zscaler.net:80/

proxy, zscaler, 証明書関連リンク

コメント