Importing the Certificate
Solution
- Download the certificate.
- In the address box of Google Chrome, enter https://repo1.maven.org/ (replace the URL with the actual one reported in the error message) and click the marked lock.

- In the dialog box that is displayed, click Certificate (Valid).

- In the dialog box that is displayed, select the first path and click View Certificate.

- In the dialog box that is displayed, select Details and click Copy to File.

- In the Certificate Export Wizard dialog box that is displayed, click Next, select Base-64 encoded X.509 (.CER), and click Next.

- Click Browse, set the certificate generation path and certificate name, click Next, and click Finish.

- In the address box of Google Chrome, enter https://repo1.maven.org/ (replace the URL with the actual one reported in the error message) and click the marked lock.
- Upload the downloaded certificate to the /home directory on the server.
- Import the certificate.
Run the command required for the OS. Type changeit and press Enter. Type yes and press Enter.
- CentOS:
1keytool -import -alias a1 -keystore /usr/lib/jvm/java-1.8.0-openjdk-1.8.0.292.b10-1.el7_9.aarch64/jre/lib/security/cacerts -file /home/a1.cer
- openEuler:
keytool -import -alias a1 -keystore /usr/lib/jvm/java-1.8.0-openjdk-1.8.0.272.b10-7.oe1.aarch64/jre/lib/security/cacerts -file /home/a1.cer
- Parameters of importing the certificate:
-alias: specifies the alias. (It is recommended that the alias be the same as the certificate name.)
-keystore: specifies the storage file, which is in the security directory of the JRE.
-file: specifies the certificate file (absolute path + file name).
- The default password of the cacerts certificate store is changeit. (If the password has been changed, use the new password.)
- If the operation fails, restart the server.
- CentOS:
- Optional: Check the certificate.
- CentOS:
ll /usr/lib/jvm/java-1.8.0-openjdk-1.8.0.292.b10-1.el7_9.aarch64/jre/lib/security/cacerts keytool -list -keystore /usr/lib/jvm/java-1.8.0-openjdk-1.8.0.292.b10-1.el7_9.aarch64/jre/lib/security/cacerts keytool -list -keystore /etc/java/java-1.8.0-openjdk/java-1.8.0-openjdk-1.8.0.292.b10-1.el7_9.aarch64/lib/security/cacerts keytool -list -alias a1 -keystore /usr/lib/jvm/java-1.8.0-openjdk-1.8.0.292.b10-1.el7_9.aarch64/jre/lib/security/cacerts
- openEuler:
ll /usr/lib/jvm/java-1.8.0-openjdk-1.8.0.272.b10-7.oe1.aarch64/jre/lib/security/cacerts keytool -list -keystore /usr/lib/jvm/java-1.8.0-openjdk-1.8.0.272.b10-7.oe1.aarch64/jre/lib/security/cacerts keytool -list -keystore /etc/java/java-1.8.0-openjdk/java-1.8.0-openjdk-1.8.0.272.b10-7.oe1.aarch64/lib/security/cacerts keytool -list -alias a1 -keystore /usr/lib/jvm/java-1.8.0-openjdk-1.8.0.272.b10-7.oe1.aarch64/jre/lib/security/cacerts
- CentOS:
- Optional: Delete the certificate.
- CentOS:
keytool -delete -alias a2 -keystore /usr/lib/jvm/java-1.8.0-openjdk-1.8.0.292.b10-1.el7_9.aarch64/jre/lib/security/cacerts
- openEuler:
keytool -delete -alias a2 -keystore /usr/lib/jvm/java-1.8.0-openjdk-1.8.0.272.b10-7.oe1.aarch64/jre/lib/security/cacerts
- CentOS:
- Set the system time.
- View the system time.
date
- If the system time is different from the current time, change the system time to the local time. For example:
1 2
date -s 20210720 date -s 11:45:00
- View the system time.
Parent topic: Common Operations