Why am I getting x509: certificate signed by unknown authority on Azure DevOps docker push to registry

I have a certificate signed by GoDaddy and a Docker private registry. This already has been setup properly as I can access the registry from server. I have also setup a build pipeline on Azure DevOps. Currently the pipeline builds but fails to push to the registry. I get the error;

Get ***/v2/: x509: certificate signed by unknown authority

Please how can I fix this?

Source: StackOverflow