Skip to content

Commit 81af38a

Browse files
wilcorreaCopilot
andcommitted
fix(user-entrypoint): combine system CA bundle with corporate cert for git SSL
The init container (phase 1) runs update-ca-certificates but is discarded. Phase 2 gets a fresh container where the system bundle has no corporate cert. Fix: concatenate both into /tmp/combined-ca.crt and point GIT_SSL_CAINFO there. Co-authored-by: Copilot <223556219+Copilot@users.noreply.github.com>
1 parent 73e7c6c commit 81af38a

1 file changed

Lines changed: 4 additions & 1 deletion

File tree

copilot-sandbox/user-entrypoint.sh

Lines changed: 4 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -62,7 +62,10 @@ fi
6262
# Corporate CA certificate
6363
if [ -f /usr/local/share/ca-certificates/extra-ca.crt ]; then
6464
export NODE_EXTRA_CA_CERTS=/usr/local/share/ca-certificates/extra-ca.crt
65-
export GIT_SSL_CAINFO=/etc/ssl/certs/ca-certificates.crt
65+
# Combine system CA bundle with corporate cert so git/curl trust both
66+
_combined_ca="/tmp/combined-ca.crt"
67+
cat /etc/ssl/certs/ca-certificates.crt /usr/local/share/ca-certificates/extra-ca.crt > "$_combined_ca"
68+
export GIT_SSL_CAINFO="$_combined_ca"
6669
fi
6770

6871
# SSH config — reconstruct from host keys (init phase runs in a separate container)

0 commit comments

Comments
 (0)