My harbor is an onpremis and is sitting behind apache.i am able to access it through webbrowser using https itself.But thorugh cmd ,when i try to docker login it is showing time out error.any idea?
I had the same issue and was able to resolve it with the following adjustments:
Previous scenario:
My setup included an Apache server with an SSL certificate, which redirected requests to another server where Harbor was running via Docker (without SSL, i.e., using HTTP).
Cause of the issue:
When trying to log in using the Docker CLI, the process failed because Harbor was exposing internal URLs with private IPs (e.g., 192.168.x.x) during the authentication flow.
Solution applied:
I edited the harbor.yml file;
In the hostname field, I set my public domain (e.g., luan.myharbor.com.br);
I uncommented and configured the external_url key with the full URL, including the protocol: external_url: https://luan.myharbor.com.br
Then I reapplied the settings using the following commands:
cd harbor/
./prepare
docker-compose down
docker-compose up -d