No basic auth credentials-Error at docker push

Hello,

we use a Nexus 3 as a private registry Server for this Server is SSL already configured and the certificates are copied to /etc/docker/certs.d/foobar.example.com:19444 on the client. But if we try to push to the nexus Server we get the error:

# docker push foobar.example.com:19444/repository/test
The push refers to a repository [foobar.example.com:19444/repository/test]
93326a1c4185: Retrying in 1 seconds
30b5d3e78e27: Retrying in 1 seconds
6a1bea788a3f: Retrying in 1 seconds
5f70bf18a086: Retrying in 1 seconds
6eb35183d3b8: Retrying in 1 seconds
no basic auth credentials

Now someone in the IRC tells me that this is a problem with the certificates but i don’t see any mistake. Maybe someone here can help me and give me a hint what I am doing wrong? I would very thanksful for every helpful hint
best regards
Dan

PS
the Login with docker login works…

Just in case someone else comes upon this I had the 'no basic auth credentials ‘error’ as well when pushing to AWS.

IF you have more than AWS account at anytime (home, work, test, etc) then it’s likely the Docker credentials are for the wrong account. Check .Docker/ for JSON with values to see if it matches your account. On a Mac the credentials are tied into the keychain as well.

You’ll need to delete them if that’s the case and remake as follows:

from: https://docs.docker.com/engine/reference/commandline/login/#credentials-store
"If you are currently logged in, run docker logout to remove the credentials from the file and run docker login again."

Did the trick.