Skip to content

Instantly share code, notes, and snippets.

@nickdiego
Last active July 6, 2024 08:18
Show Gist options
  • Save nickdiego/2b2faa35f5ab48e7438ee434d2756765 to your computer and use it in GitHub Desktop.
Save nickdiego/2b2faa35f5ab48e7438ee434d2756765 to your computer and use it in GitHub Desktop.
Clone chromium sources behind corporate proxy + https certificate

The problem

Got the following error after trying to clone/sync chromium sources behing a corporate proxy/certificate (or something similar):

(venv) (develenv) ➜ chromium git:(master) ✗ gclient sync
Syncing projects: 100% (98/98), done.                                                        
Running hooks:  18% (14/75) binutils      
________ running '/home/nickp/sandbox/chromium/venv/bin/python src/third_party/binutils/download.py' in '/home/nickp/sandbox/chromium'
NOTICE: You have PROXY values set in your environment, but gsutil in depot_tools does not (yet) obey them.
Also, --no_auth prevents the normal BOTO_CONFIG environment variable from being used.
To use a proxy in this situation, please supply those settings in a .boto file pointed to by the NO_AUTH_BOTO_CONFIG environment var.
Failed to fetch file gs://chromium-binutils/69bedb1192a03126687f75cb6cf1717758a1a59f for /home/nickp/sandbox/chromium/src/third_party/binutils/Linux_x64/binutils.tar.bz2. [Err: /home/nickp/sandbox/chromium/tools/depot_tools/external_bin/gsutil/gsutil_4.28/gsutil/third_party/boto/boto/pyami/config.py:69: UserWarning: Unable to load AWS_CREDENTIAL_FILE ()
  warnings.warn('Unable to load AWS_CREDENTIAL_FILE (%s)' % full_path)
Failure: [SSL: CERTIFICATE_VERIFY_FAILED] certificate verify failed (_ssl.c:726).

1. Create ~/.boto config file

[Boto]
proxy = 100.100.100.100
proxy_port = 8080
ca_certificates_file = /path/to/certificate.crt

2. Export NO_AUTH_BOTO_CONFIG

export NO_AUTH_BOTO_CONFIG=~/.boto

3. Finally run sync the sources

gclient sync

or

gclient runhooks

Refs:

@bzhao
Copy link

bzhao commented May 6, 2021

But how can i have the file of " /path/to/certificate.crt"

Cheers!

@bzhao
Copy link

bzhao commented May 6, 2021

OK I get my work done by:

[Boto]
proxy = 127.0.0.1
proxy_port = 41091
proxy_type = http
#ca_certificates_file = /path/to/certificate.crt

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment