How to debug docker login issue which is occurring intermittently?

595 views Asked by At

When I'm trying to login to GitHub Container Registry, I'm getting below error intermittently.

Docker login for 'ghcr.io' failed with exit code 1

So, I checked the Docker Daemon logs (/var/log/messages) and I found below information on the log regarding the login failure.

level=info msg="Error logging in to endpoint, trying next endpoint" error="Get \https://ghcr.io/v2/\: remote error: tls: internal error"
level=error msg="Handler for POST /v1.41/auth returned error: Get \https://ghcr.io/v2/\: remote error: tls: internal error"

But I didn't get the root cause of this error. Is there any way to see more details of the error?

1

There are 1 answers

2
BMitch On

You could dig through the Go TLS source for the various instances of alertInternalError to see what may be triggering this issue. It would probably be easier to debug with a tool like openssl to verify you are really talking to GHCR:

openssl s_client -connect ghcr.io:443 -showcerts </dev/null

Check for the key being valid (Verification: OK), not expired, or any other issues.

Given that it's intermittent, my suspicion is either a flaky network dropping connections, or a proxy on the network dropping connections.