Skip to content

GitLab self-signed SSL

openssl genrsa -out ca.key 2048
openssl req -new -x509 -days 365 -key ca.key -subj "/C=CN/ST=GD/L=SZ/O=Acme, Inc./CN=Acme Root CA" -out ca.crt

openssl req -newkey rsa:2048 -nodes -keyout gitlab.local.net.key -subj "/C=CN/ST=GD/L=SZ/O=Acme, Inc./CN=gitlab.local.net" -out gitlab.local.net.csr

openssl x509 -req -extfile <(printf "subjectAltName=DNS:gitlab.local.net") -days 365 -in gitlab.local.net.csr -CA ca.crt -CAkey ca.key -CAcreateserial -out gitlab.local.net.crt