Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Installing collection dependencies from git repositories fails #117

Open
lask79 opened this issue Feb 25, 2024 · 0 comments
Open

Installing collection dependencies from git repositories fails #117

lask79 opened this issue Feb 25, 2024 · 0 comments
Labels
bug Something isn't working

Comments

@lask79
Copy link

lask79 commented Feb 25, 2024

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: {'git@github.com:organization/repo_name.git': 'devel'}

I get this error:
Could not find git executable to extract the collection from the Git repository 'git@github.com: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 "git@github.com: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

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
bug Something isn't working
Projects
None yet
Development

No branches or pull requests

2 participants