Cannot login private docker registry (x509: certificate signed by unknown authority)

docker

#1

I’m having a problem creating a docker image and pushing to my private docker registry. I tried to force my server.crt certificate file and performed an update certificates operation. However, it seems that everything still leads to the final result “x509: certificate signed by unknown authority”.

  • Here is my sample configuration
  • run:
    name: Authentication and push private hub
    command: |
    sudo mkdir -p /usr/local/share/ca-certificates/
    sudo cp server.crt /usr/local/share/ca-certificates/server.crt
    sudo update-ca-certificates
    docker login https://registry.host.com --username $DOCKER_USER --password $DOCKER_PASS
    docker push registry.host.com/bbb-auth:$BRANCH

Please give me a help. I am very grateful to you for that