Error 1: Timeout
ERROR! Timeout exceeded when downloading collection from galaxy
# Increase timeout
ansible-galaxy collection install community.general --timeout 120
# Or set in ansible.cfg
# [galaxy]
# server_timeout = 120
Error 2: SSL Certificate Error
ERROR! Failed to validate the SSL certificate for galaxy.ansible.com
# Temporary fix (not recommended for production)
ansible-galaxy collection install community.general --ignore-certs
# Proper fix: update CA certificates
sudo apt update && sudo apt install ca-certificates
# Or on RHEL
sudo yum install ca-certificates
Error 3: Requirements File Errors
# requirements.yml — correct format
---
collections:
- name: community.general
version: ">=7.0.0"
- name: ansible.posix
- name: community.crypto
roles:
- name: geerlingguy.docker
version: "6.1.0"
ansible-galaxy install -r requirements.yml
ansible-galaxy collection install -r requirements.yml
Error 4: Permission Denied
# Install to user directory
ansible-galaxy collection install community.general -p ~/.ansible/collections
# Or fix permissions
sudo chown -R $USER:$USER ~/.ansible
Error 5: Version Conflict
ERROR! Cannot meet dependency requirement 'community.general>=5.0.0' for collection ansible.netcommon
# Force reinstall
ansible-galaxy collection install community.general --force
# Install specific version
ansible-galaxy collection install community.general:==8.0.0
Error 6: Behind a Proxy
export HTTPS_PROXY=http://proxy.example.com:8080
ansible-galaxy collection install community.general
Or in ansible.cfg:
[galaxy]
server = https://galaxy.ansible.com
Verify Installation
# List installed collections
ansible-galaxy collection list
# Check specific collection
ansible-galaxy collection list community.general
# Show collection path
ansible-config dump | grep COLLECTIONS_PATHS
Offline Installation
# Download on a connected machine
ansible-galaxy collection download community.general -p /tmp/collections
# Install on air-gapped machine
ansible-galaxy collection install /tmp/collections/community-general-8.0.0.tar.gz
Conclusion
Most Galaxy install errors come from network issues (timeout, SSL, proxy) or permission problems. Increase timeouts, update certificates, and use --force for version conflicts.