borgbackup / homebrew-tap

borgbackup packages for macOS homebrew users
30 stars 7 forks source link

pip install error when behind proxy #20

Open mjs271 opened 2 years ago

mjs271 commented 2 years ago

Hello!

I've been setting up a new M1 mac (Monterey) for work, where I'm behind a proxy.

The issue is, when trying to install via brew install borgbackup/tap/borgbackup-fuse, the install fails. Checking out the relevant pip log file, I see:

Using pip 22.2.2 from /opt/homebrew/Cellar/borgbackup-fuse/1.2.2/libexec/lib/python3.10/site-packages/pip (python 3.10)
Processing /private/tmp/borgbackup-fuse--msgpack-20220908-71490-1fkre4e/msgpack-1.0.4
  Installing build dependencies: started
  Running command pip subprocess to install build dependencies
  Collecting Cython~=0.29.30
    WARNING: Retrying (Retry(total=4, connect=None, read=None, redirect=None, status=None)) after connection broken by 'SSLError(SSLCertVerificationError(1, '[SSL: CERTIFICATE_VERIFY_FAILED] certificate verify failed: unable to get local issuer certificate (_ssl.c:997)'))': /packages/4c/76/1e41fbb365ad20b6efab2e61b0f4751518444c953b390f9b2d36cf97eea0/Cython-0.29.32.tar.gz
    WARNING: Retrying (Retry(total=3, connect=None, read=None, redirect=None, status=None)) after connection broken by 'SSLError(SSLCertVerificationError(1, '[SSL: CERTIFICATE_VERIFY_FAILED] certificate verify failed: unable to get local issuer certificate (_ssl.c:997)'))': /packages/4c/76/1e41fbb365ad20b6efab2e61b0f4751518444c953b390f9b2d36cf97eea0/Cython-0.29.32.tar.gz
    WARNING: Retrying (Retry(total=2, connect=None, read=None, redirect=None, status=None)) after connection broken by 'SSLError(SSLCertVerificationError(1, '[SSL: CERTIFICATE_VERIFY_FAILED] certificate verify failed: unable to get local issuer certificate (_ssl.c:997)'))': /packages/4c/76/1e41fbb365ad20b6efab2e61b0f4751518444c953b390f9b2d36cf97eea0/Cython-0.29.32.tar.gz
    WARNING: Retrying (Retry(total=1, connect=None, read=None, redirect=None, status=None)) after connection broken by 'SSLError(SSLCertVerificationError(1, '[SSL: CERTIFICATE_VERIFY_FAILED] certificate verify failed: unable to get local issuer certificate (_ssl.c:997)'))': /packages/4c/76/1e41fbb365ad20b6efab2e61b0f4751518444c953b390f9b2d36cf97eea0/Cython-0.29.32.tar.gz
    WARNING: Retrying (Retry(total=0, connect=None, read=None, redirect=None, status=None)) after connection broken by 'SSLError(SSLCertVerificationError(1, '[SSL: CERTIFICATE_VERIFY_FAILED] certificate verify failed: unable to get local issuer certificate (_ssl.c:997)'))': /packages/4c/76/1e41fbb365ad20b6efab2e61b0f4751518444c953b390f9b2d36cf97eea0/Cython-0.29.32.tar.gz
  ERROR: Could not install packages due to an OSError: HTTPSConnectionPool(host='files.pythonhosted.org', port=443): Max retries exceeded with url: /packages/4c/76/1e41fbb365ad20b6efab2e61b0f4751518444c953b390f9b2d36cf97eea0/Cython-0.29.32.tar.gz (Caused by SSLError(SSLCertVerificationError(1, '[SSL: CERTIFICATE_VERIFY_FAILED] certificate verify failed: unable to get local issuer certificate (_ssl.c:997)')))

  error: subprocess-exited-with-error

  × pip subprocess to install build dependencies did not run successfully.
  │ exit code: 1
  ╰─> See above for output.

I do have all my proxy variables set, including ALL_PROXY (as I understand the one Homebrew looks to first), and, as far as I know, my certificates are in order because using pip directly works behind the proxy. I also give the proxy info in my pip.conf file:

[global]
proxy = proxy.zz.com:42
trusted-host = pypi.org
               files.pythonhosted.org
               pypi.python.org
[install]
proxy = proxy.zz.com:42
trusted-host = pypi.org
               files.pythonhosted.org
               pypi.python.org

Further, the install went through just fine when I took my computer home and was on my own network (just glad it wasn't a workstation 🙂), so this issue is non-urgent for me, personally.

Let me know if I can provide any further info, and thank you for a great product!