The Google Cloud SDK commands are Python executables. However, the Google Cloud SDK may use third party libraries with their own CA certificate stores.
To add a CA certificate to the third party Google Cloud SDK libraries,
execute something like the commands below, replacing
CA_CERT_PATH
with the path to the CA
certificate file.
sudo -i
CA_CERT_PATH='CA_CERT_PATH
'
CA_CERT=$(basename -- "${CA_CERT_PATH}")
cd /opt
for FILE in $(find google-cloud-sdk/ -type f -name 'cacert*')
do
echo "${FILE}"
cp \
-a \
-- \
"${FILE}" \
"${FILE}.orig"
(
echo
echo "# ${CA_CERT}"
cat -- "${CA_CERT_PATH}"
) >>"${FILE}"
done
for DIR in $(find google-cloud-sdk/ -type d -name 'cacert*')
do
echo "${DIR}"
cp \
-a \
-- \
"${CA_CERT_PATH}" \
"${DIR}"
done
exit