There are two problems when you try to log in to harbor machine on another machine using docker. The ip of this machine is: 192.438+068.0.7.
First login:
The result is wrong:
The statement found on the internet is that you can't log in with ip, you must use domain name. When installing harbor, the related domain name has already used the domain name to generate a certificate.
Therefore, to modify the harbor.cfg configuration file and change it into a configuration file, you must run the prepare file in the harbor directory.
. /prepare
Restart harbor after running: docker-compose down first, and then start harbor:docker-compose up -d-d-d-d.
To run the docker-compose command, you must switch the directory to the harbor directory to run it.
After completing this step, log in for the second time:
Where harbor.xxx.com is the domain name used to generate the certificate.
As a result, a second error was reported:
The online saying is: because of self-signature, refer to:/a/11900000815155.
The solution is as follows:
1 Put the ca certificate harbor.xxx.com.crt generated in the port server on the machine to be logged in.
scp harbor.xxx.com.crt 192. 168 . 0 . 7:/home
2 On the machine of 192. 168.0.7, put the crt certificate in the directory of/etc/docker/certs. d/harbor.xxx.com (note: this directory did not exist at first, even certs.d did not exist, so it was built manually).
mkdir-p/etc/docker/certs . d/harbor . XXX . com
Then, restart docker.
Systemctl restarts docker.
Log in again (note: harbor.xxx.com needs to add ip and domain name mapping to the /etc/hosts file).
/etc/hosts
People seem to be on the highway all their lives, trying desperately to surpass each other, but they don't know where they are going. The fo