企業のProxy内でUbuntu 16.04を利用しています。Dockerを利用したPythonライブラリのインストールがうまくいかず、httpsがうまく通っていないことを疑っています。(Docker上ではなく)ターミナル上で以下のスクリプトを実行するとファイルを取得できます。
wget https://bootstrap.pypa.io/get-pip.py
一方、以下を実行すると、
curl https://bootstrap.pypa.io/get-pip.py
curl: (28) Operation timed out after 300000 milliseconds with 0 out of 0 bytes received
というエラーが出て接続ができません。
証明書のアップデートがうまくいっていないか、ファイアウォールの設定では?と思っているのですが、どのように問題の切り分けができるかアドバイスいただけないでしょうか?
なお、FireFoxではhttpsのページに問題なく接続できます。
curl 実行時にプロキシを指定した場合、結果がどうなるか試してみてください
ありがとうございます。プロキシ指定について把握していませんでした。指定すると以下の通りになります。この場合、SSLのルート証明書をインストールすればいい、ということですよね。
curl performs SSL certificate verification by default, using a "bundle"
of Certificate Authority (CA) public keys (CA certs). If the default
bundle file isn't adequate, you can specify an alternate file
using the --cacert option.
If this HTTPS server uses a certificate signed by a CA represented in
the bundle, the certificate verification probably failed due to a
problem with the certificate (it might be expired, or the name might
not match the domain name in the URL).
If you'd like to turn off curl's verification of the certificate, use
the -k (or --insecure) option.
HTTPS-proxy has similar options --proxy-cacert and --proxy-insecure.
どんなコマンドを実行したのか不明ですし、スクリプトへのアクセスが成功したとしてもどのような挙動となるのが正しいのか不明ですので、正否の判断はできません。
今回は、通常時プロキシを利用するネット環境の場合は、プロキシを利用することを明確に指定しましましょう。という指摘となります。
なるほど。アドバイスありがとうございます。
また、コマンド記載しておらず、すみません。
curl https://www.google.co.jp -x http://*.*.*.*:8080
となります。このときに上のSSLエラーが出ました。
回答1件
あなたの回答
tips
プレビュー