# Docker daemon using https on insecure local registry can't push or pull

**URL:** <https://forums.docker.com/t/docker-daemon-using-https-on-insecure-local-registry-cant-push-or-pull/32546>\
**Category:** General\
**Tags:** insecure-registry\
**Created:** [May 20, 2017, 5:43pm UTC](https://forums.docker.com/t/docker-daemon-using-https-on-insecure-local-registry-cant-push-or-pull/32546 "2017-05-20T17:43:31Z")\
**Posts on this page:** 2\
**Page:** 1

<div class="post-metadata">

**Author:** ![skinney6](https://sea3.discourse-cdn.com/docker/user_avatar/forums.docker.com/skinney6/32/16036_2.png) [@skinney6](https://forums.docker.com/u/skinney6)\
**Post date:** [May 20, 2017, 5:43pm UTC](https://forums.docker.com/t/docker-daemon-using-https-on-insecure-local-registry-cant-push-or-pull/32546/1 "2017-05-20T17:43:31Z")

</div>

Running docker `Server Version: 17.03.1-ce` on Arch linux. Running registy:v2 on localhost:

```auto
docker run --name registry -d -p 5000:5000 \
       -e "REGISTRY_STORAGE=s3" \
       -e "REGISTRY_STORAGE_S3_REGION=region"\
       -e "REGISTRY_STORAGE_S3_BUCKET=bucket"\
       -e "REGISTRY_STORAGE_S3_ACCESSKEY=redacted"\
       -e "REGISTRY_STORAGE_S3_SECRETKEY=redacted"\
       registry:2

```

Set daemon to use localhost:5000 as insecure registry:

```auto
Insecure Registries:
 localhost:5000
 127.0.0.0/8

```

but push still fails with:

```auto
Attempting next endpoint for push after error: Get https://localhost:5000/v2/: http: server gave HTTP response to HTTPS client

```

I also get this on amazon-linux ec2.  
This works fine on Ubuntu 16.04 with out setting insecure-regsitries.  
Help!  
I have no idea what’s going on.

---

<div class="post-metadata">

**Author:** ![programmerq](https://sea3.discourse-cdn.com/docker/user_avatar/forums.docker.com/programmerq/32/208_2.png) [@programmerq](https://forums.docker.com/u/programmerq)\
**Post date:** [May 23, 2017, 7:43pm UTC](https://forums.docker.com/t/docker-daemon-using-https-on-insecure-local-registry-cant-push-or-pull/32546/2 "2017-05-23T19:43:19Z")

</div>

Can you grab the docker daemon logs?

My guess is that it tried to push with http, and got an error, so it tried https next. The docker daemon log should have that information. If not, then I would recommend putting your daemon into debug mode, then retry, and then grab the logs. Post the logs that appear while you try doing the push.
