mirror of
https://github.com/goharbor/harbor.git
synced 2025-01-21 23:21:26 +01:00
Merge pull request #2630 from yixingjia/fixcommonname
Fix common name issue.
This commit is contained in:
commit
73c44723f5
@ -17,12 +17,12 @@ fi
|
||||
# Create CA certificate
|
||||
openssl req \
|
||||
-newkey rsa:4096 -nodes -sha256 -keyout harbor_ca.key \
|
||||
-x509 -days 365 -out harbor_ca.crt -subj '/C=CN/ST=PEK/L=Bei Jing/O=VMware/CN=Harbor CA'
|
||||
-x509 -days 365 -out harbor_ca.crt -subj '/C=CN/ST=PEK/L=Bei Jing/O=VMware/CN=HarborCA'
|
||||
|
||||
# Generate a Certificate Signing Request
|
||||
openssl req \
|
||||
-newkey rsa:4096 -nodes -sha256 -keyout $IP.key \
|
||||
-out $IP.csr -subj '/C=CN/ST=PEK/L=Bei Jing/O=VMware/CN=Harbor CA'
|
||||
-out $IP.csr -subj '/C=CN/ST=PEK/L=Bei Jing/O=VMware/CN=HarborManager'
|
||||
|
||||
# Generate the certificate of local registry host
|
||||
echo subjectAltName = IP:$IP > extfile.cnf
|
||||
@ -32,4 +32,4 @@ openssl x509 -req -days 365 -in $IP.csr -CA harbor_ca.crt \
|
||||
# Copy to harbor default location
|
||||
mkdir -p /data/cert
|
||||
cp $IP.crt /data/cert/server.crt
|
||||
cp $IP.key /data/cert/server.key
|
||||
cp $IP.key /data/cert/server.key
|
||||
|
Loading…
Reference in New Issue
Block a user