Description
Issue
When I try to install my current collection that has a dependency to a git repository using:
ade install -e . --venv .venv
galaxy.yml
dependencies: {'[email protected]:organization/repo_name.git': 'devel'}
I get this error:
Could not find git executable to extract the collection from the Git repository '[email protected]:organization/repo_name.git'.
Analyzation
I debugged it a bit and I found out that the PATH env variable is empty after ADE is calling ansible-galaxy. ansible-galaxy tries to find the git executable here:
https://github.com/ansible/ansible/blob/1b209d742e39900e676e6a43f900801e67cc9154/lib/ansible/galaxy/collection/concrete_artifact_manager.py#L419
What I also tried:
- install via requirements.yml works 👍
- install via ansible-galaxy directly 👍
ansible-galaxy collection install "[email protected]:organization/repo_name.git,devel"
The only thing I can see that PATH is empty when ansible-galaxy is called via ADE and that get_bin_path is looking for git in PATH and some other default locations:
https://github.com/ansible/ansible/blob/1b209d742e39900e676e6a43f900801e67cc9154/lib/ansible/module_utils/common/process.py#L32