# Pulling from private registry

**URL:** <https://drone.discourse.group/t/pulling-from-private-registry/8112>\
**Category:** Drone Support\
**Created:** [April 1, 2021, 5:58am UTC](https://drone.discourse.group/t/pulling-from-private-registry/8112 "2021-04-01T05:58:17Z")\
**Posts on this page:** 2\
**Page:** 1

<div class="post-metadata">

**Author:** ![PixelToast](https://yyz1.discourse-cdn.com/flex003/user_avatar/drone.discourse.group/pixeltoast/32/3207_2.png) [@PixelToast](https://drone.discourse.group/u/PixelToast)\
**Post date:** [April 1, 2021, 5:58am UTC](https://drone.discourse.group/t/pulling-from-private-registry/8112/1 "2021-04-01T05:58:17Z")

</div>

I’m having trouble using a docker container from a private registry, drone spits out `default: Error response from daemon: Head http://10.120.252.1:5555/v2/test_image/manifests/latest: unauthorized: authentication required`.

I’ve followed [Images | Drone](https://docs.drone.io/pipeline/docker/syntax/images/), created a `dockerconfig` secret containing:

```auto
{
  "auths": {
    "http://10.120.252.1:5555": {
      "auth": "<base64 of username:password>",
    }
  }
}

```

and added it to `image_pull_secrets` in my pipeline:

```auto
kind: pipeline
type: docker
name: default

steps:
  - name: greeting
    image: 10.120.252.1:5555/test_image
    commands:
      - echo hello

image_pull_secrets:
  - dockerconfig

```

Pulling images with `docker pull 10.120.252.1:5555/test_image` using these credentials works fine on the host machine.

I can’t find any additional information on the error in the logs of either drone or runner.

Running Drone 1.10.1 and Docker 20.10.5

---

<div class="post-metadata">

**Author:** ![lizheming](https://yyz1.discourse-cdn.com/flex003/user_avatar/drone.discourse.group/lizheming/32/3688_2.png) [@lizheming](https://drone.discourse.group/u/lizheming)\
**Post date:** [April 2, 2021, 2:54am UTC](https://drone.discourse.group/t/pulling-from-private-registry/8112/2 "2021-04-02T02:54:09Z")

</div>

try add `image_pull_secrets` config into step.

```auto
kind: pipeline
type: docker
name: default

steps:
  - name: greeting
    image: 10.120.252.1:5555/test_image
    image_pull_secrets:
      - dockerconfigjson
    commands:
      - echo hello

image_pull_secrets:
  - dockerconfig

```
