Created
December 22, 2021 00:15
-
-
Save abelardojarab/e954df52c80dcddcb8c70c3471f17548 to your computer and use it in GitHub Desktop.
Add the certificate of server
This file contains 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 characters
SERVER=jaraberrocal.readmyblog.org | |
PORT=2443 | |
CERTIFICATE=/etc/gitlab-runner/certs/${SERVER}.crt | |
# Create the certificates hierarchy expected by gitlab | |
sudo mkdir -p $(dirname "$CERTIFICATE") | |
# Get the certificate in PEM format and store it | |
openssl s_client -connect ${SERVER}:${PORT} -showcerts </dev/null 2>/dev/null | sed -e '/-----BEGIN/,/-----END/!d' | sudo tee "$CERTIFICATE" >/dev/null |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment