# Unable to install collections from Red Hat Automation Hub

**URL:** <https://forum.ansible.com/t/unable-to-install-collections-from-red-hat-automation-hub/10868>\
**Category:** Get Help\
**Tags:** galaxy, collections, galaxy-ng, ee\
**Created:** [November 13, 2024, 7:47am UTC](https://forum.ansible.com/t/unable-to-install-collections-from-red-hat-automation-hub/10868 "2024-11-13T07:47:13Z")\
**Posts on this page:** 4\
**Page:** 1

<div class="post-metadata">

**Author:** ![DevOpsJeremy](https://sea1.discourse-cdn.com/ansible/user_avatar/forum.ansible.com/devopsjeremy/32/5030_2.png) [@DevOpsJeremy](https://forum.ansible.com/u/DevOpsJeremy)\
**Post date:** [November 13, 2024, 7:47am UTC](https://forum.ansible.com/t/unable-to-install-collections-from-red-hat-automation-hub/10868/1 "2024-11-13T07:47:13Z")

</div>

I’m building an execution environment in a CI pipeline and it’s unable to install certain collections. I’m receiving this error:

```bash
> ANSIBLE_GALAXY_DISABLE_GPG_VERIFY=1 ansible-galaxy collection install $ANSIBLE_GALAXY_CLI_COLLECTION_OPTS -r requirements.yml --collections-path "/usr/share/ansible/collections"
Starting galaxy collection install process
Process install dependency map
[WARNING]: Skipping Galaxy server https://console.redhat.com/api/automation-hub/. Got an unexpected error when getting available versions of collection microsoft.ad: 'results'
[WARNING]: Skipping Galaxy server https://console.redhat.com/api/automation-hub/. Got an unexpected error when getting available versions of collection microsoft.sql: 'results'
[WARNING]: Skipping Galaxy server https://console.redhat.com/api/automation-hub/. Got an unexpected error when getting available versions of collection redhat.satellite_operations: 'results'
ERROR! Failed to resolve the requested dependencies map. Could not satisfy the following requirements:
* redhat.satellite_operations:3.0.0 (direct request)

```

The first 2 (`microsoft.ad` and `microsoft.sql`) are available publicly on Ansible Galaxy, whereas [`redhat.satellite_operations`](https://console.redhat.com/ansible/automation-hub/repo/published/redhat/satellite_operations/) is on Red Hat’s Hybrid Cloud Automation Hub and requires authentication, which I think is the issue. I generated a token for the AH [here](https://console.redhat.com/ansible/automation-hub/token).

I’ve tried passing the token with `ansible-galaxy collection install --token $TOKEN redhat.satellite_operations`, but no change. I’ve also tried including the token in the `ansible.cfg`:

```ini
[galaxy]
server_list = automation_hub, galaxy_hub
[galaxy_server.automation_hub]
url=https://console.redhat.com/api/automation-hub/
token=token123
[galaxy_server.galaxy_hub]
url=https://galaxy.ansible.com/

```

Is the Automation Hub the issue? What’s the right way to authenticate with it? Or if not, how can I get this working?

---

<div class="post-metadata">

**Author:** ![johan](https://avatars.discourse-cdn.com/v4/letter/j/dec6dc/32.png) [@johan](https://forum.ansible.com/u/johan)\
**Post date:** [November 13, 2024, 5:12pm UTC](https://forum.ansible.com/t/unable-to-install-collections-from-red-hat-automation-hub/10868/2 "2024-11-13T17:12:32Z")

</div>

hello,

the entries look incomplete for the automation hub.

I think you should have an entry for the repositoriy of certified collections, with this URL :  
[https://console.redhat.com/api/automation-hub/content/published/](https://console.redhat.com/api/automation-hub/content/published/)

… and another entry for the repository hosting the validated collections, such as :  
[https://console.redhat.com/api/automation-hub/content/validated/](https://console.redhat.com/api/automation-hub/content/validated/)

Johan

---

<div class="post-metadata">

**Author:** ![DevOpsJeremy](https://sea1.discourse-cdn.com/ansible/user_avatar/forum.ansible.com/devopsjeremy/32/5030_2.png) [@DevOpsJeremy](https://forum.ansible.com/u/DevOpsJeremy)\
**Post date:** [November 13, 2024, 10:01pm UTC](https://forum.ansible.com/t/unable-to-install-collections-from-red-hat-automation-hub/10868/3 "2024-11-13T22:01:27Z")

</div>

The issue was the way I was authenticating with Automation Hub. I changed my `ansible.cfg` to this:

```ini
[galaxy]
server_list = galaxy_hub, automation_hub

[galaxy_server.automation_hub]
url=https://console.redhat.com/api/automation-hub/
auth_url=https://sso.redhat.com/auth/realms/redhat-external/protocol/openid-connect/token

[galaxy_server.galaxy_hub]
url=https://galaxy.ansible.com/

```

And instead of passing the token with `--token`, I use these environment variables:

- `ANSIBLE_GALAXY_SERVER_AUTOMATION_HUB_TOKEN`
- `ANSIBLE_GALAXY_SERVER_GALAXY_HUB_TOKEN`

This fixed my issue.

---

<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:** [December 13, 2024, 10:02pm UTC](https://forum.ansible.com/t/unable-to-install-collections-from-red-hat-automation-hub/10868/4 "2024-12-13T22:02:20Z")

</div>

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