-
-
Save muhozi/3400a74395eb7ef940551a99a511ece0 to your computer and use it in GitHub Desktop.
Revisions
-
jij revised this gist
Oct 30, 2020 . 1 changed file with 1 addition and 1 deletion.There are no files selected for viewing
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters. Learn more about bidirectional Unicode charactersOriginal file line number Diff line number Diff line change @@ -6,7 +6,7 @@ credit: https://stackoverflow.com/questions/39356413/how-to-add-a-custom-ca-root [global] trusted-host = pypi.python.org pypi.org files.pythonhosted.org cert = /etc/ssl/certs/ca-bundle.crt (if config is not set, use pip --cert or --trust-host each call) -
jij revised this gist
Oct 30, 2020 . 1 changed file with 2 additions and 1 deletion.There are no files selected for viewing
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters. Learn more about bidirectional Unicode charactersOriginal file line number Diff line number Diff line change @@ -34,7 +34,8 @@ NPM - two options >yarn config set cafile path/to/ca-bundle.crt -g Docker - yarn (same concept for others tool) #copy custom cert, in current build directory COPY zscaler-root-ca.crt /usr/local/share/ca-certificates/zscaler-root-ca.crt -
jij revised this gist
Oct 30, 2020 . 1 changed file with 1 addition and 0 deletions.There are no files selected for viewing
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters. Learn more about bidirectional Unicode charactersOriginal file line number Diff line number Diff line change @@ -67,6 +67,7 @@ Run sudo update-ca-trust extract. If you use nodejs provided by Red Hat, that's If you have compiled nodejs yourself, or have downloaded nodejs from https://nodejs.org/, you need to configure yarn to use the OS trust store instead of the included static nodejs trust store: yarn config set cafile /etc/pki/ca-trust/extracted/pem/tls-ca-bundle.pem Debian/Ubuntu This is similar to the instructions for Red Hat Enterprise Linux: -
jij revised this gist
Oct 30, 2020 . 1 changed file with 11 additions and 0 deletions.There are no files selected for viewing
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters. Learn more about bidirectional Unicode charactersOriginal file line number Diff line number Diff line change @@ -16,9 +16,20 @@ credit: https://stackoverflow.com/questions/39356413/how-to-add-a-custom-ca-root >git config --global http.sslVerify true >git config --global http.sslCAInfo path/to/ca-bundle.crt NPM - two options 1. using evironment var >set npm_config_cafile=/etc/ssl/cert.pem 2. using config >npm config set strict-ssl true -g >npm config set cafile path/to/ca-bundle.crt -g //if npm invoke script to call node directly, npm config is not respected, two workground 1. disable node TLS check through env var >set NODE_TLS_REJECT_UNAUTHORIZED=0 2. add custom cert through en var >set NODE_EXTRA_CA_CERTS=/etc/ssl/cert.pem >yarn config set strict-ssl true -g >yarn config set cafile path/to/ca-bundle.crt -g -
jij revised this gist
Jun 17, 2020 . 1 changed file with 3 additions and 1 deletion.There are no files selected for viewing
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters. Learn more about bidirectional Unicode charactersOriginal file line number Diff line number Diff line change @@ -1,4 +1,4 @@ credit: https://stackoverflow.com/questions/39356413/how-to-add-a-custom-ca-root-certificate-to-the-ca-store-used-by-pip-in-windows/52961564 >pip config set global.cert path/to/ca-bundle.crt >pip config list # user trusted-host @@ -32,9 +32,11 @@ RUN apk update && apk add ca-certificates && rm -rf /var/cache/apk/* # update-ca-certificates - add the cert to /etc/ssl/certs/ca-certificates.crt bundle RUN update-ca-certificates credit: #http://manpages.ubuntu.com/manpages/xenial/man8/update-ca-certificates.8.html #https://hackernoon.com/alpine-docker-image-with-secured-communication-ssl-tls-go-restful-api-128eb6b54f1f credit: https://serverfault.com/questions/62496/ssl-certificate-location-on-unix-linux "/etc/ssl/certs/ca-certificates.crt", // Debian/Ubuntu/Gentoo etc. "/etc/pki/tls/certs/ca-bundle.crt", // Fedora/RHEL 6 -
jij renamed this gist
Jun 17, 2020 . 1 changed file with 0 additions and 0 deletions.There are no files selected for viewing
File renamed without changes. -
jij revised this gist
Jun 2, 2020 . 1 changed file with 8 additions and 1 deletion.There are no files selected for viewing
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters. Learn more about bidirectional Unicode charactersOriginal file line number Diff line number Diff line change @@ -22,11 +22,18 @@ https://stackoverflow.com/questions/39356413/how-to-add-a-custom-ca-root-certifi >yarn config set strict-ssl true -g >yarn config set cafile path/to/ca-bundle.crt -g Docker #copy custom cert, in current build directory COPY zscaler-root-ca.crt /usr/local/share/ca-certificates/zscaler-root-ca.crt # some base image don't have update-ca-certificates RUN apk update && apk add ca-certificates && rm -rf /var/cache/apk/* # update-ca-certificates - add the cert to /etc/ssl/certs/ca-certificates.crt bundle RUN update-ca-certificates #http://manpages.ubuntu.com/manpages/xenial/man8/update-ca-certificates.8.html #https://hackernoon.com/alpine-docker-image-with-secured-communication-ssl-tls-go-restful-api-128eb6b54f1f https://serverfault.com/questions/62496/ssl-certificate-location-on-unix-linux "/etc/ssl/certs/ca-certificates.crt", // Debian/Ubuntu/Gentoo etc. -
jij revised this gist
Jun 2, 2020 . 1 changed file with 19 additions and 0 deletions.There are no files selected for viewing
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters. Learn more about bidirectional Unicode charactersOriginal file line number Diff line number Diff line change @@ -35,3 +35,22 @@ https://serverfault.com/questions/62496/ssl-certificate-location-on-unix-linux "/etc/pki/tls/cacert.pem", // OpenELEC "/etc/pki/ca-trust/extracted/pem/tls-ca-bundle.pem", // CentOS/RHEL 7 "/etc/ssl/cert.pem", // Alpine Linux _Linux setup_ On Fedora/RHEL/CentOS/Debian/Ubuntu I would add it to the OS trust store, and configure yarn to use the OS trust store. This will also make the registry trusted by your browser, and tools like curl/wget, openssl. Fedora/RHEL/CentOS Add the CA or self signed certificate to /etc/pki/ca-trust/source/anchors/. Run sudo update-ca-trust extract. If you use nodejs provided by Red Hat, that's it! If you have compiled nodejs yourself, or have downloaded nodejs from https://nodejs.org/, you need to configure yarn to use the OS trust store instead of the included static nodejs trust store: yarn config set cafile /etc/pki/ca-trust/extracted/pem/tls-ca-bundle.pem Debian/Ubuntu This is similar to the instructions for Red Hat Enterprise Linux: Add your .crt file to /usr/local/share/ca-certificates sudo update-ca-certificates yarn config set cafile /etc/ssl/certs/ca-certificates.crt -
jij revised this gist
Jun 2, 2020 . 1 changed file with 4 additions and 4 deletions.There are no files selected for viewing
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters. Learn more about bidirectional Unicode charactersOriginal file line number Diff line number Diff line change @@ -16,11 +16,11 @@ https://stackoverflow.com/questions/39356413/how-to-add-a-custom-ca-root-certifi >git config --global http.sslVerify true >git config --global http.sslCAInfo path/to/ca-bundle.crt >npm config set strict-ssl true -g >npm config set cafile path/to/ca-bundle.crt -g >yarn config set strict-ssl true -g >yarn config set cafile path/to/ca-bundle.crt -g Docker COPY zscaler-root-ca.crt /usr/local/share/ca-certificates/zscaler-root-ca.crt -
jij revised this gist
Jun 2, 2020 . 1 changed file with 2 additions and 2 deletions.There are no files selected for viewing
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters. Learn more about bidirectional Unicode charactersOriginal file line number Diff line number Diff line change @@ -19,8 +19,8 @@ https://stackoverflow.com/questions/39356413/how-to-add-a-custom-ca-root-certifi >npm config -g set strict-ssl true >npm config -g set cafile path/to/ca-bundle.crt >yarn config -g set strict-ssl true >yarn config -g set cafile path/to/ca-bundle.crt Docker COPY zscaler-root-ca.crt /usr/local/share/ca-certificates/zscaler-root-ca.crt -
jij revised this gist
Jun 2, 2020 . 1 changed file with 2 additions and 0 deletions.There are no files selected for viewing
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters. Learn more about bidirectional Unicode charactersOriginal file line number Diff line number Diff line change @@ -1,3 +1,5 @@ https://stackoverflow.com/questions/39356413/how-to-add-a-custom-ca-root-certificate-to-the-ca-store-used-by-pip-in-windows/52961564 >pip config set global.cert path/to/ca-bundle.crt >pip config list # user trusted-host pip.ini or pip.conf -
jij revised this gist
Jun 2, 2020 . 1 changed file with 20 additions and 7 deletions.There are no files selected for viewing
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters. Learn more about bidirectional Unicode charactersOriginal file line number Diff line number Diff line change @@ -1,17 +1,30 @@ >pip config set global.cert path/to/ca-bundle.crt >pip config list # user trusted-host pip.ini or pip.conf [global] trusted-host = pypi.python.org pypi.org files.pythonhosted.org cert = /etc/ssl/certs/ca-bundle.crt (if config is not set, use pip --cert or --trust-host each call) >conda config --set ssl_verify path/to/ca-bundle.crt (or false to disable) >conda config --show ssl_verify >git config --global http.sslVerify true >git config --global http.sslCAInfo path/to/ca-bundle.crt >npm config -g set strict-ssl true >npm config -g set cafile path/to/ca-bundle.crt >yarn config set strict-ssl true >yarn config set cafile path/to/ca-bundle.crt Docker COPY zscaler-root-ca.crt /usr/local/share/ca-certificates/zscaler-root-ca.crt RUN update-ca-certificates # update-ca-certificates - add the cert to /etc/ssl/certs/ca-certificates.crt bundle #http://manpages.ubuntu.com/manpages/xenial/man8/update-ca-certificates.8.html https://serverfault.com/questions/62496/ssl-certificate-location-on-unix-linux "/etc/ssl/certs/ca-certificates.crt", // Debian/Ubuntu/Gentoo etc. -
jij created this gist
Jun 2, 2020 .There are no files selected for viewing
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters. Learn more about bidirectional Unicode charactersOriginal file line number Diff line number Diff line change @@ -0,0 +1,22 @@ pip config set global.cert path/to/ca-bundle.crt pip config list conda config --set ssl_verify path/to/ca-bundle.crt conda config --show ssl_verify git config --global http.sslVerify true git config --global http.sslCAInfo path/to/ca-bundle.crt Docker COPY zscaler-root-ca.crt /usr/local/share/ca-certificates/zscaler-root-ca.crt RUN update-ca-certificates # update-ca-certificates - add the cert to /etc/ssl/certs/ca-certificates.crt bundle https://serverfault.com/questions/62496/ssl-certificate-location-on-unix-linux "/etc/ssl/certs/ca-certificates.crt", // Debian/Ubuntu/Gentoo etc. "/etc/pki/tls/certs/ca-bundle.crt", // Fedora/RHEL 6 "/etc/ssl/ca-bundle.pem", // OpenSUSE "/etc/pki/tls/cacert.pem", // OpenELEC "/etc/pki/ca-trust/extracted/pem/tls-ca-bundle.pem", // CentOS/RHEL 7 "/etc/ssl/cert.pem", // Alpine Linux