# Error: server gave HTTP response to HTTPS client

**URL:** <https://forums.docker.com/t/error-server-gave-http-response-to-https-client/121766>\
**Category:** Docker Desktop\
**Tags:** windows\
**Created:** [March 2, 2022, 3:26am UTC](https://forums.docker.com/t/error-server-gave-http-response-to-https-client/121766 "2022-03-02T03:26:41Z")\
**Posts on this page:** 5\
**Page:** 1

<div class="post-metadata">

**Author:** ![alamba78](https://sea3.discourse-cdn.com/docker/user_avatar/forums.docker.com/alamba78/32/32456_2.png) [@alamba78](https://forums.docker.com/u/alamba78)\
**Post date:** [March 2, 2022, 3:26am UTC](https://forums.docker.com/t/error-server-gave-http-response-to-https-client/121766/1 "2022-03-02T03:26:42Z")

</div>

I have been pulling my hair out trying to resolve this issue.  
I am using Ubuntu via WSL2 on Windows 10 Pro. I have also tried the same just using elevated privileges on Powershell, with no luck. I am at home without a proxy in India. Doing a docker -v in WSL2 reveals I am using Docker version 20.10.6, build 370c289.

I am using Docker Desktop v. 4.5.1 (74721) from Windows 10 Pro 20H2 x64. I am doing a simple docker login and I get this error. I have tried setting my DNS to 8.8.8.8, tried setting insecure-registries to localhost:5000, set buildkit to false. I have restarted docker desktop, tried docker logout and then docker login, and nothing works.

The full error message is:  
Error response from daemon: Get “[https://registry-1.docker.io/v2/](https://registry-1.docker.io/v2/)”: http: server gave HTTP response to HTTPS client

Whether I am logged into Docker Desktop itself with my docker hub userid and password, or logging in with docker login, I get this problem.

Does anyone have any ideas?

---

<div class="post-metadata">

**Author:** ![franklinwk3123](https://sea3.discourse-cdn.com/docker/user_avatar/forums.docker.com/franklinwk3123/32/32496_2.png) [@franklinwk3123](https://forums.docker.com/u/franklinwk3123)\
**Post date:** [May 26, 2022, 6:58am UTC](https://forums.docker.com/t/error-server-gave-http-response-to-https-client/121766/2 "2022-05-26T06:58:57Z")

</div>

try to add `"insecure-registries": ["https://registry-1.docker.io"]` to the end of file named `C:\Users\${USER_NAME}\.docker\daemon.json` and restart docker service on Windows

---

<div class="post-metadata">

**Author:** ![xamele0n](https://sea3.discourse-cdn.com/docker/user_avatar/forums.docker.com/xamele0n/32/34834_2.png) [@xamele0n](https://forums.docker.com/u/xamele0n)\
**Post date:** [July 6, 2022, 9:25am UTC](https://forums.docker.com/t/error-server-gave-http-response-to-https-client/121766/3 "2022-07-06T09:25:32Z")

</div>

I have the same issue, and it seems as a bug in docker-desktop.  
In my case trying to call `docker pull` of base image first, solves problem

---

<div class="post-metadata">

**Author:** ![ypolosov](https://sea3.discourse-cdn.com/docker/user_avatar/forums.docker.com/ypolosov/32/40940_2.png) [@ypolosov](https://forums.docker.com/u/ypolosov)\
**Post date:** [June 1, 2023, 1:43pm UTC](https://forums.docker.com/t/error-server-gave-http-response-to-https-client/121766/4 "2023-06-01T13:43:43Z")

</div>

it must be either `"insecure-registries": ["http://registry-1.docker.io"]` or `"insecure-registries": ["registry-1.docker.io"]`

---

<div class="post-metadata">

**Author:** ![michael116](https://sea3.discourse-cdn.com/docker/user_avatar/forums.docker.com/michael116/32/54583_2.png) [@michael116](https://forums.docker.com/u/michael116)\
**Post date:** [September 19, 2025, 10:44am UTC](https://forums.docker.com/t/error-server-gave-http-response-to-https-client/121766/5 "2025-09-19T10:44:09Z")

</div>

hey did you manage to solve your issue.

I am facing the same issue on the ubuntu remote environment where i have created my private docker repository.  
/eaglepay/payments-scaffold:1.0": failed to do request: Head “[https://91.99.61.225:5000/v2/eaglepay/payments-scaffold/manifests/1.0](https://91.99.61.225:5000/v2/eaglepay/payments-scaffold/manifests/1.0)”: http: server gave HTTP response to HTTPS client  
i have tried making the connection insecure but am still getting the same error over and over
