# Please fix my galaxy namespace

**URL:** <https://forum.ansible.com/t/please-fix-my-galaxy-namespace/5176>\
**Category:** Get Help\
**Tags:** galaxy-ng\
**Created:** [April 26, 2024, 6:52pm UTC](https://forum.ansible.com/t/please-fix-my-galaxy-namespace/5176 "2024-04-26T18:52:50Z")\
**Posts on this page:** 5\
**Page:** 1

<div class="post-metadata">

**Author:** ![MonolithProjects](https://sea1.discourse-cdn.com/ansible/user_avatar/forum.ansible.com/monolithprojects/32/1014_2.png) [@MonolithProjects](https://forum.ansible.com/u/MonolithProjects)\
**Post date:** [April 26, 2024, 6:52pm UTC](https://forum.ansible.com/t/please-fix-my-galaxy-namespace/5176/1 "2024-04-26T18:52:50Z")

</div>

For last few months my namespace `monolithprojects` is broken. For some reason my namespace was split to two: `monolithprojects` and `MonolithProjects`.  
When uploading new releases of roles, the roles are going to `monolithprojects` but `ansible-galaxy install` downloads roles from `MonolithProjects` (which are not updated and latest releases are missing)

My namespace [Ansible Galaxy](https://galaxy.ansible.com/ui/standalone/namespaces/?page=1&page_size=10&sort=-created&keywords=monolithprojects)

```auto
  ansible-galaxy install monolithprojects.github_actions_runner
Starting galaxy role install process
- downloading role 'github_actions_runner', owned by monolithprojects
- downloading role from https://github.com/MonolithProjects/ansible-github_actions_runner/archive/1.18.7.tar.gz
- extracting monolithprojects.github_actions_runner to /home/mike/.ansible/roles/monolithprojects.github_actions_runner
- monolithprojects.github_actions_runner (1.18.7) was installed successfully

  ansible-galaxy info monolithprojects.github_actions_runner

Role: monolithprojects.github_actions_runner
        description: Deploy Github Actions private runner
        commit: b9446130396072f8e919742fb3ab0fc8c7cc934f
        commit_message: Merge pull request #191 from MonolithProjects/feat/ci

ci: adjust workflow triggers
        created: 2023-05-08T21:17:02.827720Z
        download_count: 137245
        github_branch: 1.18.7
        github_repo: ansible-github_actions_runner
        github_user: MonolithProjects
        id: 19739
        imported: 2023-12-02T23:28:55.952463
        modified: 2023-12-02T23:28:56.335793Z
        path: ('/home/mike/.ansible/roles', '/usr/share/ansible/roles', '/etc/ansible/roles')
        upstream_id: None
        username: MonolithProjects

```

Here you can see my role `monolithprojects.github_actions_runner` twice with different versions and download count. if you click on any of them, the ui will take you to the older release. [Ansible Galaxy](https://galaxy.ansible.com/ui/standalone/namespaces/9446/?page=1&page_size=10&sort=-download_count)

---

<div class="post-metadata">

**Author:** ![Denney-tech](https://sea1.discourse-cdn.com/ansible/user_avatar/forum.ansible.com/denney-tech/32/1556_2.png) [@Denney-tech](https://forum.ansible.com/u/Denney-tech)\
**Post date:** [April 26, 2024, 7:02pm UTC](https://forum.ansible.com/t/please-fix-my-galaxy-namespace/5176/2 "2024-04-26T19:02:08Z")

</div>

[@galaxy](https://forum.ansible.com/groups/galaxy) Can one of you help or does this actually need to go Red Hat support?

---

<div class="post-metadata">

**Author:** ![MonolithProjects](https://sea1.discourse-cdn.com/ansible/user_avatar/forum.ansible.com/monolithprojects/32/1014_2.png) [@MonolithProjects](https://forum.ansible.com/u/MonolithProjects)\
**Post date:** [May 28, 2024, 5:22pm UTC](https://forum.ansible.com/t/please-fix-my-galaxy-namespace/5176/3 "2024-05-28T17:22:08Z")

</div>

[@galaxy](https://forum.ansible.com/groups/galaxy) could please someone look 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:** [June 27, 2024, 3:20am UTC](https://forum.ansible.com/t/please-fix-my-galaxy-namespace/5176/4 "2024-06-27T03:20:10Z")

</div>

The github username is “_MonolithProjects_”, so the backend is defaulting to thinking that should be the namespace. In old galaxy, namespace names were managled and lowercased and substituted with underscores to try to conform to collection namespace requirements. That is probably why you were able to end up with a “_monolithprojects_” namespace. In the new galaxy, we have removed all the magic munging of namespaces and are adhering to exactly what the users are specifying with their import commands and in the content itself for predictability and consistency.

If you want to keep your github user as “_MonolithProjects_” but have your roles use “_monolithprojects_”, you’d need to add a “namespace” key in the meta/main.yml for all your roles that specifies “_monolithprojects_” as the true namespace. At import time, the backend code will use this namespace key as the source of truth …

> <https://github.com/ansible/galaxy_ng/blob/master/galaxy_ng/app/api/v1/tasks.py#L439-L446>

After updating the source for all your roles on github, you should next delete all the roles in the “wrong” namespace via curl by their role id …

[https://ansible.readthedocs.io/projects/galaxy-ng/en/latest/community/userguide/#http-client](https://ansible.readthedocs.io/projects/galaxy-ng/en/latest/community/userguide/#http-client)

You can’t permanently delete the “MonolithProjects” namespace as that will get auto created every time you login to the UI, but it doesn’t have to contain any roles.

---

<div class="post-metadata">

**Author:** ![system](https://us1.discourse-cdn.com/ansible/original/1X/1882d9a01da5d8996a862359b0913cc568a39b84.svg) [@system](https://forum.ansible.com/u/system)\
**Post date:** [August 10, 2024, 6:38pm UTC](https://forum.ansible.com/t/please-fix-my-galaxy-namespace/5176/5 "2024-08-10T18:38:52Z")

</div>

This topic was automatically closed 30 days after the last reply. New replies are no longer allowed.
