Problem pushing to private docker hub

I’m running a harbor instance on my server. I have verified I can manually push to it. But when I try using drone I get a failure.

My config:

- name: build
    image: plugins/docker
    privileged: true
    settings:
      registry: harbor.myserver.com:3002
      repo: harbor.myserver.com:3002/library/test
      tags:
        - ${DRONE_COMMIT_SHA:0:7}
        - ${DRONE_COMMIT_BRANCH}
      force_tag: true
      use_cache: true
      username:
        from_secret: harbor_user
      password:
        from_secret: harbor_password
      debug: true
    volumes:
      - name: docker
        path: /var/lib/docker

Output:

Successfully built da6c5484559a

Successfully tagged 1a9e70f4a7490a1039889cebab5dd6eb60f09158:latest

+ /usr/local/bin/docker tag 1a9e70f4a7490a1039889cebab5dd6eb60f09158 harbor.myserver.com:3002/library/test:1a9e70f

+ /usr/local/bin/docker push harbor.myserver.com:3002/library/test:1a9e70f

The push refers to repository [harbor.myserver.com:3002/library/test]

time="2021-12-03T18:20:54.230680067Z" level=info msg="Attempting next endpoint for push after error: Get \"https://harbor.myserver.com:3002/v2/\": context deadline exceeded"

Get "https://harbor.myserver.com:3002/v2/": context deadline exceeded

exit status 1

Update: I found that my user/password secrets were no longer there. After replacing them, I now get:

time="2021-12-04T21:31:13.294679182Z" level=info msg="Error logging in to endpoint, trying next endpoint" error="Get \"https://harbor.myserver.com:3002/v2/\": net/http: request canceled while waiting for connection (Client.Timeout exceeded while awaiting headers)"

time="2021-12-04T21:31:13.294957322Z" level=error msg="Handler for POST /v1.41/auth returned error: Get \"https://harbor.myserver.com:3002/v2/\": net/http: request canceled while waiting for connection (Client.Timeout exceeded while awaiting headers)"

From the server where drone is running I can successfully run docker login to the same address. Any ideas why it would time out?

@kryptus36 ,

Can you check Unable to push image to custom docker repository - #4 by RaD and let us know if after following this also you are facing issue.