# Pull images from a different Okteto namespace

**URL:** <https://community.okteto.com/t/pull-images-from-a-different-okteto-namespace/917>\
**Category:** How Do I?\
**Created:** [July 13, 2023, 1:54pm UTC](https://community.okteto.com/t/pull-images-from-a-different-okteto-namespace/917 "2023-07-13T13:54:09Z")\
**Posts on this page:** 5\
**Page:** 1

<div class="post-metadata">

**Author:** ![proof-nicholas](https://sea1.discourse-cdn.com/flex019/user_avatar/community.okteto.com/proof-nicholas/32/430_2.png) [@proof-nicholas](https://community.okteto.com/u/proof-nicholas)\
**Post date:** [July 13, 2023, 1:54pm UTC](https://community.okteto.com/t/pull-images-from-a-different-okteto-namespace/917/1 "2023-07-13T13:54:09Z")

</div>

Hi,

I have two namespaces in my account and pushed images to one of them. I’m trying to pull the image in the other namespace and it is failing to pull the image with the error:

`pull access denied, repository does not exist or may require authorization: server message: insufficient_scope: authorization failed`.

Do I have to set up credentials to pull from the registry in the other namespace? I thought that since I own both namespaces, i.e. same user account, that would be set up automatically. My ultimate goal is push shared images to this new namespace and then share the namespace with my teammates so they can use them in the deployments. I am hoping my teammates also do not need to authenticate since I will be sharing the namespace with them.

Please clarify how this can be accomplished with the namespace-sharing capability.

Thanks!

---

<div class="post-metadata">

**Author:** ![nacho](https://sea1.discourse-cdn.com/flex019/user_avatar/community.okteto.com/nacho/32/20_2.png) [@nacho](https://community.okteto.com/u/nacho)\
**Post date:** [July 14, 2023, 3:18pm UTC](https://community.okteto.com/t/pull-images-from-a-different-okteto-namespace/917/2 "2023-07-14T15:18:53Z")

</div>

Hi @proof-nicholas !

How are you trying to pull those images in the other namespace? Deploying some pods using the image pushed to the other namespace or using it as base image of other images built?

---

<div class="post-metadata">

**Author:** ![proof-nicholas](https://sea1.discourse-cdn.com/flex019/user_avatar/community.okteto.com/proof-nicholas/32/430_2.png) [@proof-nicholas](https://community.okteto.com/u/proof-nicholas)\
**Post date:** [July 17, 2023, 3:10am UTC](https://community.okteto.com/t/pull-images-from-a-different-okteto-namespace/917/3 "2023-07-17T03:10:33Z")

</div>

Both but more the former than the latter.

---

<div class="post-metadata">

**Author:** ![nacho](https://sea1.discourse-cdn.com/flex019/user_avatar/community.okteto.com/nacho/32/20_2.png) [@nacho](https://community.okteto.com/u/nacho)\
**Post date:** [July 18, 2023, 4:34pm UTC](https://community.okteto.com/t/pull-images-from-a-different-okteto-namespace/917/4 "2023-07-18T16:34:30Z")

</div>

Hi @proof-nicholas ,

The images can be used as base image in other namespaces or even being pulled in deploy flows executed in other namespaces you have access to (you are owner or member), but those images cannot be used as pod images deployed in other namespaces even if you have access to that namespace.

So, any member in a namespace can use any image created in that namespace as base image and as pod image **within** that namespace, but they cannot use those images as pod images in other namespaces.

The options to achieve something similar would be:

1. Your teammates would have to use your image as base image to build their own within their namespaces and use those for deployments.
2. Use `okteto.global` to push an image to the `okteto` namespace so any user would have access to it. The way of doing it would be using `okteto.global/<image-name>:<tag>` as image. But be aware that this would make this image available to every user in the instance.

The second option is just recommended in scenarios in which the images have to be shared with all the users. If it’s only to shared among a few users, option 1 would be the way.

Would this cover your case?

---

<div class="post-metadata">

**Author:** ![proof-nicholas](https://sea1.discourse-cdn.com/flex019/user_avatar/community.okteto.com/proof-nicholas/32/430_2.png) [@proof-nicholas](https://community.okteto.com/u/proof-nicholas)\
**Post date:** [July 18, 2023, 4:51pm UTC](https://community.okteto.com/t/pull-images-from-a-different-okteto-namespace/917/5 "2023-07-18T16:51:08Z")

</div>

Thanks for the response. Option 2 looks viable, the images we want to share should be accessible to all users within our organization. Currently, we are using ECR as a workaround but looks like the global namespace may be a viable alternative. Thanks!
