From 4ad154e4d90eadc18b236f3b3ee35ac561633a1e Mon Sep 17 00:00:00 2001 From: wemeya <1013939285@qq.com> Date: Thu, 7 Apr 2016 19:03:34 +0800 Subject: [PATCH] Delete use your own certificate --- docs/ use your own certificate | 22 ---------------------- 1 file changed, 22 deletions(-) delete mode 100644 docs/ use your own certificate diff --git a/docs/ use your own certificate b/docs/ use your own certificate deleted file mode 100644 index 3c3c12779..000000000 --- a/docs/ use your own certificate +++ /dev/null @@ -1,22 +0,0 @@ - How to use your own certificate in harbor? -1. If you already have a certificate, go to step 3. -2. If not, you can generate a self-signed certificate using openSSL with following commands - 1) Generate a private key: - openssl genrsa -out prvtkey.pem 2048 - you can call it prvtkey.pem or other names you like. - 2) Generate a certificate: - openssl req -new -x509 -key prvtkey.pem -out cacert.pem -days 1095 - prvtkey.pem is what you generated in the first step, if you change the name, you should change it in the command. Also you can name cacert.pem what you like. -3. Clone harbor to your local position. Then open Deploy, and edit the harbor.cfg, make necessary configuration changes such as hostname, admin password and mail server. Refer to Installation Guide for more info. then execute ./prepare . Here, harbor generates several config files. We need to replace the original private key and certificate with your own key and certificate. -4. Following are what you should do: - a. edit docker-compose.yml, find private_key.pem replace it with your own private key as following: - b. cd config/ui, you will see private_key.pem. - c. replace private_key.pem with your private key. - d. cd ../registry, you will see root.crt. Replace it with your certificate. - e. at the same directory, you will see config.yml. We need to modify it, open it and find root.crt, then change it to your certificate. -5. After these, go back to harbor directory, execute: - docker-compose build - docker-compose up –d -6. Then you can push/pull images to see if your own certificate works. Please refer User Guide - -