# Unable to import roles anymore: namespace different from github organization

**URL:** <https://forum.ansible.com/t/unable-to-import-roles-anymore-namespace-different-from-github-organization/2737>\
**Category:** Get Help\
**Tags:** role, galaxy-ng\
**Created:** [December 4, 2023, 4:32pm UTC](https://forum.ansible.com/t/unable-to-import-roles-anymore-namespace-different-from-github-organization/2737 "2023-12-04T16:32:55Z")\
**Posts on this page:** 19\
**Page:** 1

<div class="post-metadata">

**Author:** ![rascasoft](https://sea1.discourse-cdn.com/ansible/user_avatar/forum.ansible.com/rascasoft/32/1701_2.png) [@rascasoft](https://forum.ansible.com/u/rascasoft)\
**Post date:** [December 4, 2023, 4:32pm UTC](https://forum.ansible.com/t/unable-to-import-roles-anymore-namespace-different-from-github-organization/2737/1 "2023-12-04T16:32:56Z")

</div>

Hi everybody,  
I ended up in opening this bug [Unable to import roles anymore: namespace different from github organization · Issue #3299 · ansible/galaxy · GitHub](https://github.com/ansible/galaxy/issues/3299) because I can’t find out how to import my roles anymore.

Even if my Galaxy namespace (`mmul`) is different from my GitHub organization (`mmul-it`), things worked before, but today if I do:

```console
$ ansible-galaxy role import -vvvv --token <REDACTED> --role-name mmul.kubelab mmul-it kubelab

```

I’m getting this error message:

```console
ansible-galaxy [core 2.16.0]
  config file = /home/rasca/Git/mmul-it/kubelab/ansible.cfg
  configured module search path = ['/home/rasca/.ansible/plugins/modules', '/usr/share/ansible/plugins/modules']
  ansible python module location = /home/rasca/Labs/venvs/ansible/lib/python3.10/site-packages/ansible
  ansible collection location = /home/rasca/.ansible/collections:/usr/share/ansible/collections
  executable location = /home/rasca/Labs/venvs/ansible/bin/ansible-galaxy
  python version = 3.10.12 (main, Jun 11 2023, 05:26:28) [GCC 11.4.0] (/home/rasca/Labs/venvs/ansible/bin/python3)
  jinja version = 3.1.2
  libyaml = True
Using /home/rasca/Git/mmul-it/kubelab/ansible.cfg as config file
Initial connection to galaxy_server: https://galaxy.ansible.com/api/
Opened /home/rasca/.ansible/galaxy_token
Calling Galaxy at https://galaxy.ansible.com/api/
Found API version 'v3, pulp-v3, v1' with Galaxy server beta (https://galaxy.ansible.com/api/)
Calling Galaxy at https://galaxy.ansible.com/api/v1/imports/
ERROR! None (HTTP Code: 403, Message: Forbidden)

```

Does anyone have any suggestion on this?

Many thanks,

Raoul

---

<div class="post-metadata">

**Author:** ![markuman](https://avatars.discourse-cdn.com/v4/letter/m/7bcc69/32.png) [@markuman](https://forum.ansible.com/u/markuman)\
**Post date:** [December 4, 2023, 7:17pm UTC](https://forum.ansible.com/t/unable-to-import-roles-anymore-namespace-different-from-github-organization/2737/2 "2023-12-04T19:17:14Z")

</div>

I’ve lost also access to my namespace. After login, I become `markuman0` which has not access to my former namespace `markuman`.

Youe issue might be solved if you just import from public, without using the `--token` or import from SCM/github.com.

---

<div class="post-metadata">

**Author:** ![tannerjc](https://sea1.discourse-cdn.com/ansible/user_avatar/forum.ansible.com/tannerjc/32/985_2.png) [@tannerjc](https://forum.ansible.com/u/tannerjc)\
**Post date:** [December 4, 2023, 7:54pm UTC](https://forum.ansible.com/t/unable-to-import-roles-anymore-namespace-different-from-github-organization/2737/3 "2023-12-04T19:54:30Z")

</div>

@markuman I just fixed your namespaces. Can you check again please?

---

<div class="post-metadata">

**Author:** ![markuman](https://avatars.discourse-cdn.com/v4/letter/m/7bcc69/32.png) [@markuman](https://forum.ansible.com/u/markuman)\
**Post date:** [December 4, 2023, 7:58pm UTC](https://forum.ansible.com/t/unable-to-import-roles-anymore-namespace-different-from-github-organization/2737/4 "2023-12-04T19:58:25Z")

</div>

Yes, looks good now @tannerjc

But is this behaviour somewhere announced?  
Or the workflow how to retain the access?

---

<div class="post-metadata">

**Author:** ![tannerjc](https://sea1.discourse-cdn.com/ansible/user_avatar/forum.ansible.com/tannerjc/32/985_2.png) [@tannerjc](https://forum.ansible.com/u/tannerjc)\
**Post date:** [December 4, 2023, 7:59pm UTC](https://forum.ansible.com/t/unable-to-import-roles-anymore-namespace-different-from-github-organization/2737/5 "2023-12-04T19:59:53Z")

</div>

@markuman it’s a longstanding bug in the new galaxy that I’ve been trying to find the root cause of for a while now.

---

<div class="post-metadata">

**Author:** ![markuman](https://avatars.discourse-cdn.com/v4/letter/m/7bcc69/32.png) [@markuman](https://forum.ansible.com/u/markuman)\
**Post date:** [December 4, 2023, 8:01pm UTC](https://forum.ansible.com/t/unable-to-import-roles-anymore-namespace-different-from-github-organization/2737/6 "2023-12-04T20:01:07Z")

</div>

@tannerjc somewhere it was linked correctly

 ![Bildschirmfoto vom 2023-12-04 20-05-47](https://us1.discourse-cdn.com/ansible/original/2X/c/c83b6722bca69ebcf03d847e07bea367eedce6de.png)

---

<div class="post-metadata">

**Author:** ![tannerjc](https://sea1.discourse-cdn.com/ansible/user_avatar/forum.ansible.com/tannerjc/32/985_2.png) [@tannerjc](https://forum.ansible.com/u/tannerjc)\
**Post date:** [December 4, 2023, 8:08pm UTC](https://forum.ansible.com/t/unable-to-import-roles-anymore-namespace-different-from-github-organization/2737/7 "2023-12-04T20:08:44Z")

</div>

@markuman it’s no longer like that though …

 ![image](https://us1.discourse-cdn.com/ansible/original/2X/c/c7c5420a6680a2bc30e6d5d8015d01817ce83110.png)

---

<div class="post-metadata">

**Author:** ![tannerjc](https://sea1.discourse-cdn.com/ansible/user_avatar/forum.ansible.com/tannerjc/32/985_2.png) [@tannerjc](https://forum.ansible.com/u/tannerjc)\
**Post date:** [December 4, 2023, 8:11pm UTC](https://forum.ansible.com/t/unable-to-import-roles-anymore-namespace-different-from-github-organization/2737/8 "2023-12-04T20:11:20Z")

</div>

@rascasoft I’ve set [mmul](https://galaxy.ansible.com/ui/namespaces/mmul/) as the provider of [mmul-it](https://galaxy.ansible.com/ui/standalone/namespaces/4735/) which should give you permission to upload/delete roles from that namespace.

I don’t think that the galaxy cli or API have ever supported `<namespace>.<name>` for the --role-name argument. Had you been using this up till now?

---

<div class="post-metadata">

**Author:** ![rascasoft](https://sea1.discourse-cdn.com/ansible/user_avatar/forum.ansible.com/rascasoft/32/1701_2.png) [@rascasoft](https://forum.ansible.com/u/rascasoft)\
**Post date:** [December 4, 2023, 8:47pm UTC](https://forum.ansible.com/t/unable-to-import-roles-anymore-namespace-different-from-github-organization/2737/9 "2023-12-04T20:47:32Z")

</div>

It seems ti work now, thanks.

About the namespace.role name it was just a test, so nothing to worry about.

Many thanks!

---

<div class="post-metadata">

**Author:** ![rascasoft](https://sea1.discourse-cdn.com/ansible/user_avatar/forum.ansible.com/rascasoft/32/1701_2.png) [@rascasoft](https://forum.ansible.com/u/rascasoft)\
**Post date:** [December 4, 2023, 8:52pm UTC](https://forum.ansible.com/t/unable-to-import-roles-anymore-namespace-different-from-github-organization/2737/10 "2023-12-04T20:52:19Z")

</div>

@tannerjc there’s another bit that it’s worth fixing, if you can. There’s still the `mmul-it` namespace, that can be removed to make everything clean.

Many thanks again,

Raoul

---

<div class="post-metadata">

**Author:** ![rascasoft](https://sea1.discourse-cdn.com/ansible/user_avatar/forum.ansible.com/rascasoft/32/1701_2.png) [@rascasoft](https://forum.ansible.com/u/rascasoft)\
**Post date:** [December 5, 2023, 4:49pm UTC](https://forum.ansible.com/t/unable-to-import-roles-anymore-namespace-different-from-github-organization/2737/11 "2023-12-05T16:49:02Z")

</div>

@tannerjc hi again, I feel like this is not a “bit” as I was writing before: today I’ve tried to import the third role (`kpa_generator`) inside my `mmul` namespace ( [Use native GitHub Action for Galaxy import · mmul-it/kpa\_generator@9ec1c88 · GitHub](https://github.com/mmul-it/kpa_generator/actions/runs/7099603628/job/19324013143) ), and it seems to have worked, but it imported the role inside `mmul-it` which at this point needs to be deleted at all.

Can you help me also on this?

Many thanks,

Raoul

---

<div class="post-metadata">

**Author:** ![tannerjc](https://sea1.discourse-cdn.com/ansible/user_avatar/forum.ansible.com/tannerjc/32/985_2.png) [@tannerjc](https://forum.ansible.com/u/tannerjc)\
**Post date:** [December 5, 2023, 6:22pm UTC](https://forum.ansible.com/t/unable-to-import-roles-anymore-namespace-different-from-github-organization/2737/12 "2023-12-05T18:22:27Z")

</div>

If the role is hosted in [MMUL · GitHub](http://github.com/mmul-it), it’s expected that it get’s imported into the “mmul-it”. Currently, the only way a role hosted in [MMUL · GitHub](http://github.com/mmul-it) could end up in the “mmul” namespace is if it existed on old-galaxy and was grandfathered in. There are plans in the roadmap to try to enable the workflow you desire, but it’s not currently possible.

Do you own “mmul” on github? [docs for changing a role namespace](https://ansible.readthedocs.io/projects/galaxy-ng/en/latest/community/userguide/#changing-the-namespace-name-or-the-github_user)

---

<div class="post-metadata">

**Author:** ![rascasoft](https://sea1.discourse-cdn.com/ansible/user_avatar/forum.ansible.com/rascasoft/32/1701_2.png) [@rascasoft](https://forum.ansible.com/u/rascasoft)\
**Post date:** [December 6, 2023, 8:09am UTC](https://forum.ansible.com/t/unable-to-import-roles-anymore-namespace-different-from-github-organization/2737/13 "2023-12-06T08:09:05Z")

</div>

@tannerjc I’m really confused. Actually I’ve a mixed situation that needs to be fixed. It’s no big deal to me to change to namespace to `mmul-it` (I don’t own GitHub’s `mmul`), but I need help on this since I cannot do it on my own, and actually even if I see two roles under `mmul-it` a namespace with that name doesn’t exists.  
My `rascasoft` user in Galaxy can see just its namespace and the `mmul` one:

 ![image](https://us1.discourse-cdn.com/ansible/original/2X/a/a1a514f17035e7cc5aff6e015a6a819ae5fbbcca.png)

Can this be fixed on your side?

---

<div class="post-metadata">

**Author:** ![rascasoft](https://sea1.discourse-cdn.com/ansible/user_avatar/forum.ansible.com/rascasoft/32/1701_2.png) [@rascasoft](https://forum.ansible.com/u/rascasoft)\
**Post date:** [December 11, 2023, 10:49am UTC](https://forum.ansible.com/t/unable-to-import-roles-anymore-namespace-different-from-github-organization/2737/14 "2023-12-11T10:49:24Z")

</div>

@tannerjc are there news on this? I need to understand how I to set up the import process and then, in case, revisit the documentation of my projects.

Let me know if I can do anything to accelerate the fixing process.

Many thanks.

---

<div class="post-metadata">

**Author:** ![rascasoft](https://sea1.discourse-cdn.com/ansible/user_avatar/forum.ansible.com/rascasoft/32/1701_2.png) [@rascasoft](https://forum.ansible.com/u/rascasoft)\
**Post date:** [December 14, 2023, 5:42pm UTC](https://forum.ansible.com/t/unable-to-import-roles-anymore-namespace-different-from-github-organization/2737/15 "2023-12-14T17:42:47Z")

</div>

Hey @tannerjc any news on this?

---

<div class="post-metadata">

**Author:** ![tannerjc](https://sea1.discourse-cdn.com/ansible/user_avatar/forum.ansible.com/tannerjc/32/985_2.png) [@tannerjc](https://forum.ansible.com/u/tannerjc)\
**Post date:** [December 14, 2023, 8:37pm UTC](https://forum.ansible.com/t/unable-to-import-roles-anymore-namespace-different-from-github-organization/2737/16 "2023-12-14T20:37:06Z")

</div>

@rascasoft I’ve been working on a possible solution here [support legacy role import overrides for namespace and name. by jctanner · Pull Request #2011 · ansible/galaxy\_ng · GitHub](https://github.com/ansible/galaxy_ng/pull/2011)

Documentation and examples to follow once the rest of the team and some of the regular stakeholders have chimed in.

---

<div class="post-metadata">

**Author:** ![rascasoft](https://sea1.discourse-cdn.com/ansible/user_avatar/forum.ansible.com/rascasoft/32/1701_2.png) [@rascasoft](https://forum.ansible.com/u/rascasoft)\
**Post date:** [December 21, 2023, 3:08pm UTC](https://forum.ansible.com/t/unable-to-import-roles-anymore-namespace-different-from-github-organization/2737/17 "2023-12-21T15:08:48Z")

</div>

Many thanks @tannerjc I see that the commit got merged, and I have two questions:

1. What do I need to wait to get things working? Because at the moment I still see the import going to the wrong namespace.
2. Can I (or you) remove the `mmul` Galaxy namespace that will create a lot of confusion when everything will be working again?

Many thanks again for your support.

---

<div class="post-metadata">

**Author:** ![tannerjc](https://sea1.discourse-cdn.com/ansible/user_avatar/forum.ansible.com/tannerjc/32/985_2.png) [@tannerjc](https://forum.ansible.com/u/tannerjc)\
**Post date:** [December 21, 2023, 3:36pm UTC](https://forum.ansible.com/t/unable-to-import-roles-anymore-namespace-different-from-github-organization/2737/18 "2023-12-21T15:36:17Z")

</div>

Here’s what needs to happen before the patch lands in production:

- testing on [galaxy-dev.ansible.com](http://galaxy-dev.ansible.com) to validate the patch works as expected and no regressions have occurred.
- deploy the patch to [galaxy-stage.ansible.com](http://galaxy-stage.ansible.com)
- testing on [galaxy-stage.ansible.com](http://galaxy-stage.ansible.com) to validate the patch works as expected and no regressions have occurred.
- write/fix documentation.
- write a forum post to announce the change.
- deploy the patch to [galaxy.ansible.com](http://galaxy.ansible.com)

We need to keep the mmul namespace around until we’ve vetted that you have a way to continue uploading role[versions].

---

<div class="post-metadata">

**Author:** ![rascasoft](https://sea1.discourse-cdn.com/ansible/user_avatar/forum.ansible.com/rascasoft/32/1701_2.png) [@rascasoft](https://forum.ansible.com/u/rascasoft)\
**Post date:** [February 7, 2024, 5:39pm UTC](https://forum.ansible.com/t/unable-to-import-roles-anymore-namespace-different-from-github-organization/2737/19 "2024-02-07T17:39:39Z")

</div>

Hey @tannerjc hi! I don’t know where we are with all the needed steps, but I can confirm that things now work as expected, and the fix was good.

So I feel like we can remove the `mmul-it` namespace, since I’m able to upload roles there [https://galaxy.ansible.com/ui/standalone/namespaces/9440/](https://galaxy.ansible.com/ui/standalone/namespaces/9440/).

NOTE that in the previous messages I asked for `mmul` namespace to be removed, **but that’s an error** , it is `mmul-it` that needs to be removed.

Many thanks!

Raoul
