# Portainer Registry Integration

**URL:** <https://community.codefresh.io/t/portainer-registry-integration/126>\
**Category:** Integrations\
**Created:** [October 8, 2019, 4:29pm UTC](https://community.codefresh.io/t/portainer-registry-integration/126 "2019-10-08T16:29:18Z")\
**Posts on this page:** 7\
**Page:** 1

<div class="post-metadata">

**Author:** ![Michalis\_Vitos](https://sea1.discourse-cdn.com/flex019/user_avatar/community.codefresh.io/michalis_vitos/32/79_2.png) [@Michalis\_Vitos](https://community.codefresh.io/u/Michalis_Vitos)\
**Post date:** [October 8, 2019, 4:29pm UTC](https://community.codefresh.io/t/portainer-registry-integration/126/1 "2019-10-08T16:29:18Z")

</div>

Hi,

Is there a way to connect to the CodeFresh Docker Registry via Portainer? I would like to be able to pull images and deploy the containers through the UI of Portainer, instead of the cli. The Portainer UI looks like this:

 ![34%20pm](https://us1.discourse-cdn.com/flex019/uploads/codefreshtest/original/1X/341d06850dc5e8292c724fc9e53a05f428f16f20.png)

Best wishes,  
Michalis

---

<div class="post-metadata">

**Author:** ![todaywasawesome](https://sea1.discourse-cdn.com/flex019/user_avatar/community.codefresh.io/todaywasawesome/32/91_2.png) [@todaywasawesome](https://community.codefresh.io/u/todaywasawesome)\
**Post date:** [October 8, 2019, 5:25pm UTC](https://community.codefresh.io/t/portainer-registry-integration/126/2 "2019-10-08T17:25:02Z")

</div>

It depends on what api capabilities Portainer requires. The Codefresh registry api doesn’t support searching for example. But other than that, I would try adding it as a normal registry. [Bootstrap · Content moved](https://codefresh.io/docs/docs/docker-registries/codefresh-registry/#pull-image-from-codefresh-registry)

The much more common flow is to have Codefresh promoting these images to a registry you want to use for production.

---

<div class="post-metadata">

**Author:** ![Michalis\_Vitos](https://sea1.discourse-cdn.com/flex019/user_avatar/community.codefresh.io/michalis_vitos/32/79_2.png) [@Michalis\_Vitos](https://community.codefresh.io/u/Michalis_Vitos)\
**Post date:** [October 9, 2019, 9:57am UTC](https://community.codefresh.io/t/portainer-registry-integration/126/3 "2019-10-09T09:57:59Z")

</div>

Thanks @todaywasawesome, that is very useful and I could indeed use Codefresh to promote that image to another registry from which I can later pull it into Portainer. I tried, for example, to promote my image to [Canister.io](http://canister.io) and then then use Portainer to pull the image from [Canister.io](http://Canister.io) and that seems to work fine.

However, my question was mostly focused on the correct credentials and registry URL etc. that I should use on Portainer, in order to connect Portainer to the Codefresh registry. I don’t need special capabilities like searching etc. I just need to pull the images from within Portainer, which Portainer seems to support from various private registries. It seems like an overkill to have to promote the image to another registry.

Thanks again for your help,  
Michalis

---

<div class="post-metadata">

**Author:** ![Kostis](https://sea1.discourse-cdn.com/flex019/user_avatar/community.codefresh.io/kostis/32/391_2.png) [@Kostis](https://community.codefresh.io/u/Kostis)\
**Post date:** [October 9, 2019, 10:09am UTC](https://community.codefresh.io/t/portainer-registry-integration/126/4 "2019-10-09T10:09:47Z")

</div>

Credentials should be like this

- Name = anything you want (e.g. codefresh-registry)
- Registry URL = [r.cfcr.io](http://r.cfcr.io)
- Username = your codefresh username
- Password = the access token you can create from [Bootstrap · Content moved](https://codefresh.io/docs/docs/docker-registries/codefresh-registry/#generate-cfcr-login-token)

I think this process should work out of the box. Did you get an error message?

---

<div class="post-metadata">

**Author:** ![Michalis\_Vitos](https://sea1.discourse-cdn.com/flex019/user_avatar/community.codefresh.io/michalis_vitos/32/79_2.png) [@Michalis\_Vitos](https://community.codefresh.io/u/Michalis_Vitos)\
**Post date:** [October 9, 2019, 10:59am UTC](https://community.codefresh.io/t/portainer-registry-integration/126/5 "2019-10-09T10:59:53Z")

</div>

Thanks for the prompt reply @Kostis.

That’s what I also tried, but unfortunately it doesn’t work. I receive the following error message:

```
Failure

Get https://r.cfcr.io/v2/michalisvitos/michalisvitos/test/manifests/latest: denied: {"errors":[{"code":"UNAUTHORIZED","message":"authentication required"}]}

```

---

<div class="post-metadata">

**Author:** ![Kostis](https://sea1.discourse-cdn.com/flex019/user_avatar/community.codefresh.io/kostis/32/391_2.png) [@Kostis](https://community.codefresh.io/u/Kostis)\
**Post date:** [October 9, 2019, 11:49am UTC](https://community.codefresh.io/t/portainer-registry-integration/126/6 "2019-10-09T11:49:24Z")

</div>

Try using as Registry URL just `r.cfcr.io` on its own.

I just tried it and it works. From your error message you see that the URL you are trying to pull has your username twice (which is probably not what you want)

 ![pull-image-portainer](https://us1.discourse-cdn.com/flex019/uploads/codefreshtest/original/1X/513996653d444c2c14aa1a09bf53ea1b2b9d5d79.png)

---

<div class="post-metadata">

**Author:** ![Michalis\_Vitos](https://sea1.discourse-cdn.com/flex019/user_avatar/community.codefresh.io/michalis_vitos/32/79_2.png) [@Michalis\_Vitos](https://community.codefresh.io/u/Michalis_Vitos)\
**Post date:** [October 9, 2019, 12:14pm UTC](https://community.codefresh.io/t/portainer-registry-integration/126/7 "2019-10-09T12:14:36Z")

</div>

That seems to do the trick! Thanks @Kostis!
