# Galaxy Role Import: Namespace & GitHub User / Org Mismatch

**URL:** <https://forum.ansible.com/t/galaxy-role-import-namespace-github-user-org-mismatch/45995>\
**Category:** Guides, FAQs & Howtos\
**Tags:** role, howto, galaxy-ng\
**Created:** [June 30, 2026, 7:25am UTC](https://forum.ansible.com/t/galaxy-role-import-namespace-github-user-org-mismatch/45995 "2026-06-30T07:25:32Z")\
**Posts on this page:** 1\
**Page:** 1

<div class="post-metadata">

**Author:** ![dbrennand](https://sea1.discourse-cdn.com/ansible/user_avatar/forum.ansible.com/dbrennand/32/7830_2.png) [@dbrennand](https://forum.ansible.com/u/dbrennand)\
**Post date:** [June 30, 2026, 7:25am UTC](https://forum.ansible.com/t/galaxy-role-import-namespace-github-user-org-mismatch/45995/1 "2026-06-30T07:25:32Z")

</div>

## Summary

This guide explains how to successfully import your role into [galaxy.ansible.com](http://galaxy.ansible.com) when the role namespace name and GitHub user or organization slug do not match.

For example, the GitHub organization slug is `my-amazingorg` but the role namespace name is `my_amazingorg`.

## Import Symptoms

When using the `ansible-galaxy role import` command you may see HTTP 500 internal server errors from Galaxy:

```auto
[ERROR]: None (HTTP Code: 500, Message: Internal Server Error)

```

Furthermore, you may see an error similar to below in the Galaxy tasks:

```auto
===== CLONING REPO =====
...
fatal: could not read Username for 'https://github.com': terminal prompts disabled

```

## Resolution: Galaxy REST API

You can import your role using the Galaxy REST API directly.

1. Ensure your role’s `meta/main.yml` `galaxy_info.namespace` value matches the destination role namespace on Galaxy:

2. Retrieve your [Galaxy token](https://galaxy.ansible.com/ui/token/).

3. Place your Galaxy token into a variable:

4. Use the following command to import the role, **modifying `github_repo`, `github_user` and `alternate_clone_url`** :

## References

- [Namespace: mmul-it - #14 by dbrennand](https://forum.ansible.com/t/namespace-mmul-it/45861/14)
- [Unable to import role into galaxy namespace based on github org](https://forum.ansible.com/t/unable-to-import-role-into-galaxy-namespace-based-on-github-org/45699)
- [namespace: digitalis - #16 by dbrennand](https://forum.ansible.com/t/namespace-digitalis/45751/16)
