# Trying to start first container gets Unauthorized Get https://registry-1.docker.io/

**URL:** <https://forums.suse.com/t/trying-to-start-first-container-gets-unauthorized-get-https-registry-1-docker-io/2707>\
**Category:** Rancher 1.x\
**Created:** [May 6, 2016, 12:21pm UTC](https://forums.suse.com/t/trying-to-start-first-container-gets-unauthorized-get-https-registry-1-docker-io/2707 "2016-05-06T12:21:43Z")\
**Posts on this page:** 6\
**Page:** 1

<div class="post-metadata">

**Author:** ![Carl\_Boberg](https://sea2.discourse-cdn.com/flex022/user_avatar/forums.suse.com/carl_boberg/32/1292_2.png) [@Carl\_Boberg](https://forums.suse.com/u/Carl_Boberg)\
**Post date:** [May 6, 2016, 12:21pm UTC](https://forums.suse.com/t/trying-to-start-first-container-gets-unauthorized-get-https-registry-1-docker-io/2707/1 "2016-05-06T12:21:44Z")

</div>

Hi,

I have just set up my first rancher with a master and 3 separate hosts.  
All running centos7 and latest docker 1.11  
Now im trying to start my first simple container with the Add Container button  
I get this error in the logs on the hosts where ist trying to start it:

```auto
2016-05-06 12:08:53,368 ERROR agent [140664992217840] [event.py:112] Error in request : f0e00130-8147-48d8-be89-35aa033def05 
Traceback (most recent call last):
  File "/var/lib/cattle/pyagent/cattle/agent/event.py", line 95, in _worker_main
    resp = agent.execute(req)
  File "/var/lib/cattle/pyagent/cattle/agent/ __init__.py", line 15, in execute
    return self._router.route(req)
  File "/var/lib/cattle/pyagent/cattle/plugins/core/event_router.py", line 13, in route
    resp = handler.execute(req)
  File "/var/lib/cattle/pyagent/cattle/agent/handler.py", line 34, in execute
    return method(req=req, **req.data. __dict__ )
  File "/var/lib/cattle/pyagent/cattle/storage/ __init__.py", line 27, in image_activate
    action=lambda: self._do_image_activate(image, storage_pool,
  File "/var/lib/cattle/pyagent/cattle/agent/handler.py", line 72, in _do
    action()
  File "/var/lib/cattle/pyagent/cattle/storage/ __init__.py", line 28, in <lambda>
    progress)
  File "/var/lib/cattle/pyagent/cattle/plugins/docker/storage.py", line 151, in _do_image_activate
    insecure_registry=True):
  File "/var/lib/cattle/pyagent/dist/docker/api/image.py", line 200, in pull
    self._raise_for_status(response)
  File "/var/lib/cattle/pyagent/dist/docker/client.py", line 146, in _raise_for_status
    raise errors.APIError(e, response, explanation=explanation)
APIError: 401 Client Error: Unauthorized ("Get https://registry-1.docker.io/v2/rancher/agent-instance/manifests/v0.8.1: unauthorized: incorrect username or password")

```

There are no problems starting something like “docker run -it --name=second\_container ubuntu:14.04.2” on the host. That container shows up on the host in the rancher master gui…

Cant help feeling Im missing something crucial but I have followed the documentation closely…

---

<div class="post-metadata">

**Author:** ![denise](https://avatars.discourse-cdn.com/v4/letter/d/82dd89/32.png) [@denise](https://forums.suse.com/u/denise)\
**Post date:** [May 6, 2016, 2:51pm UTC](https://forums.suse.com/t/trying-to-start-first-container-gets-unauthorized-get-https-registry-1-docker-io/2707/2 "2016-05-06T14:51:09Z")

</div>

Did you set up a Docker registry in the Registries section?

It sounds like there is a docker username/password located under Infrastructure/Registries. Even if you don’t reference the username/password, it will use those credentials when pulling images.

 ![](https://us1.discourse-cdn.com/flex022/uploads/suse/original/2X/0/05ebe53dfaaf877a10495a071876a5faf8cc2e91.png)

---

<div class="post-metadata">

**Author:** ![Carl\_Boberg](https://sea2.discourse-cdn.com/flex022/user_avatar/forums.suse.com/carl_boberg/32/1292_2.png) [@Carl\_Boberg](https://forums.suse.com/u/Carl_Boberg)\
**Post date:** [May 9, 2016, 7:47am UTC](https://forums.suse.com/t/trying-to-start-first-container-gets-unauthorized-get-https-registry-1-docker-io/2707/3 "2016-05-09T07:47:04Z")

</div>

Hi!

Thanks for the quick answer. Yes I had configured my private DockerHub account on the Registry section.  
Everything started working as soon as I removed the registry configuration. Thanks!

One question remains as to why? Why cant I have my own private registry connected to get access my images and install your haproxy service for example, or as in this case just a simple ubuntu image?  
i could imagine that there are some security concerns perhaps?  
(I was thinking it would work by downloading the rancher/agent-instance:v0.8.1 and push it to my own registry? But then it wont be accessible under that name…)

---

<div class="post-metadata">

**Author:** ![denise](https://avatars.discourse-cdn.com/v4/letter/d/82dd89/32.png) [@denise](https://forums.suse.com/u/denise)\
**Post date:** [May 10, 2016, 5:46am UTC](https://forums.suse.com/t/trying-to-start-first-container-gets-unauthorized-get-https-registry-1-docker-io/2707/4 "2016-05-10T05:46:24Z")

</div>

You should be able to still have your Docker registry credentials and pull any public image. But the error you showed was showing that there was a typo in your credentials (incorrect username or password).

We have some open enhancements around being able to validate credentials.

> <https://github.com/rancher/rancher/issues/300>

---

<div class="post-metadata">

**Author:** ![Carl\_Boberg](https://sea2.discourse-cdn.com/flex022/user_avatar/forums.suse.com/carl_boberg/32/1292_2.png) [@Carl\_Boberg](https://forums.suse.com/u/Carl_Boberg)\
**Post date:** [May 10, 2016, 6:57am UTC](https://forums.suse.com/t/trying-to-start-first-container-gets-unauthorized-get-https-registry-1-docker-io/2707/5 "2016-05-10T06:57:15Z")

</div>

DOH!

I do beg your forgiveness for taking up your time with a simple typo… _red face of embarrassment_

---

<div class="post-metadata">

**Author:** ![karthik1008](https://avatars.discourse-cdn.com/v4/letter/k/59ef9b/32.png) [@karthik1008](https://forums.suse.com/u/karthik1008)\
**Post date:** [January 24, 2017, 12:48am UTC](https://forums.suse.com/t/trying-to-start-first-container-gets-unauthorized-get-https-registry-1-docker-io/2707/6 "2017-01-24T00:48:18Z")

</div>

how do I set the username and password in infrastructure/registries section
