Docker Login fails with 403 and 'unexpected end of JSON input' errors

“docker login” started failing with 403 errors and an empty response (evidenced by ‘unexpected end of JSON input’) (On Windows)

C:>docker -v
Docker version 19.03.13, build 4484c46d9d

C:>docker login registry.gitlab.com -u
Password:

I’ve tried adding /v1 and /v2 to the call, and tried it on 2 different computers, and always get the same results.

This was working fine until just the past couple of days.

I had recent Docker Desktop updates on both machines, but am not certain whether the onset of the failure coincided with the updates or not.

Anyone have any ideas about what might be wrong and how to work around it?

Hi Bill,

Did you find out the reason?

We seem to experience a similar issue

docker login registry.gitlab.com

[...provide username/pass...]

Error response from daemon: Get https://registry.gitlab.com/v2/: error parsing HTTP 403 response body: unexpected end of JSON input: ""

This seems to work from local machines, but not from a build server that - up until a few days ago - pushing daily images to the registry.

What is relevant to note:
About a week ago we have changed the main account’s password and forgot to update the build server’s credentials.

Ie: for ~7 days the build server was trying to access gitlab with wrong credentials.

Could it be that the IP got blacklisted?

Hi

I am experiencing the same issue but on a local machine. Calling:
docker login registry.gitlab.com -u USERNAME registry.gitlab.com -p PAT
results in:

Error response from daemon: Get "https://registry.gitlab.com/v2/": error parsing HTTP 403 response body: unexpected end of JSON input: ""

Any idea what we could do?