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

Getting 404 errors from github while trying to install roles #4230

Open
ssbarnea opened this issue Jun 21, 2024 · 4 comments
Open

Getting 404 errors from github while trying to install roles #4230

ssbarnea opened this issue Jun 21, 2024 · 4 comments
Assignees

Comments

@ssbarnea
Copy link
Member

ssbarnea commented Jun 21, 2024

I discovered this new error that appeared:

ansible-galaxy role install -vvv --force ssbarnea.ansible_role_helloworld
ansible-galaxy [core 2.17.0]
  config file = None
  configured module search path = ['/Users/ssbarnea/.ansible/plugins/modules', '/usr/share/ansible/plugins/modules']
  ansible python module location = /Users/ssbarnea/.asdf/installs/python/3.12.3/lib/python3.12/site-packages/ansible
  ansible collection location = /Users/ssbarnea/.ansible/collections:/usr/share/ansible/collections
  executable location = /Users/ssbarnea/.asdf/installs/python/3.12.3/bin/ansible-galaxy
  python version = 3.12.3 (main, May 10 2024, 13:04:47) [Clang 15.0.0 (clang-1500.3.9.4)] (/Users/ssbarnea/.asdf/installs/python/3.12.3/bin/python3.12)
  jinja version = 3.1.4
  libyaml = True
No config file found; using defaults
Starting galaxy role install process
Processing role ssbarnea.ansible_role_helloworld 
Opened /Users/ssbarnea/.ansible/galaxy_token
- downloading role 'ansible_role_helloworld', owned by ssbarnea
- downloading role from https://github.com/ssbarnea/ansible-role-helloworld/archive/main.tar.gz
 [ERROR]: failed to download the file: HTTP Error 404: Not Found
[WARNING]: - ssbarnea.ansible_role_helloworld was NOT installed successfully.
ERROR! - you can use --ignore-errors to skip failed roles and finish processing the list.

Test with weget

$ wget https://github.com/ssbarnea/ansible-role-helloworld/archive/main.tar.gz
wget https://github.com/ssbarnea/ansible-role-helloworld/archive/main.tar.gz
--2024-06-27 08:21:58--  https://github.com/ssbarnea/ansible-role-helloworld/archive/main.tar.gz
Resolving github.com (github.com)... 20.26.156.215
Connecting to github.com (github.com)|20.26.156.215|:443... connected.
HTTP request sent, awaiting response... 
  HTTP/1.1 302 Found
  Server: GitHub.com
  Date: Thu, 27 Jun 2024 07:21:59 GMT
  Content-Type: text/html; charset=utf-8
  Vary: X-PJAX, X-PJAX-Container, Turbo-Visit, Turbo-Frame, Accept-Encoding, Accept, X-Requested-With
  Location: https://codeload.github.com/ssbarnea/ansible-role-helloworld/tar.gz/refs/heads/main
Location: https://codeload.github.com/ssbarnea/ansible-role-helloworld/tar.gz/refs/heads/main [following]
--2024-06-27 08:21:59--  https://codeload.github.com/ssbarnea/ansible-role-helloworld/tar.gz/refs/heads/main
Resolving codeload.github.com (codeload.github.com)... 20.26.156.216
Connecting to codeload.github.com (codeload.github.com)|20.26.156.216|:443... connected.
HTTP request sent, awaiting response... 
  HTTP/1.1 200 OK

curl test

$ curl -s -L -o /dev/null -w "%{http_code}" https://github.com/ssbarnea/ansible-role-helloworld/archive/main.tar.gz 
200%  

To my surprise wget does not get the same result and I am wondering if GH started to ban galaxy user agent?

@ssbarnea
Copy link
Member Author

Apparently this happens only on my MacOS box but I also seen it in GHA pipelines. I tried same version of ansible in Fedora VM running on my mac and that one works fine, same ansible version.

@yurnov
Copy link

yurnov commented Jun 27, 2024

Just tried on fresh installation of ansible-core from stable-2.16 branch:

docker run -it --rm python:3.12-slim bash -c "pip install --upgrade pip; pip install 'ansible-core>=2.16.0,<2.17.0'; ansible-galaxy role install -vvv --force ssbarnea.ansible_role_helloworld"
Requirement already satisfied: pip in /usr/local/lib/python3.12/site-packages (24.0)
Collecting pip
  Downloading pip-24.1.1-py3-none-any.whl.metadata (3.6 kB)
Downloading pip-24.1.1-py3-none-any.whl (1.8 MB)
   ━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━ 1.8/1.8 MB 4.9 MB/s eta 0:00:00
Installing collected packages: pip
  Attempting uninstall: pip
    Found existing installation: pip 24.0
    Uninstalling pip-24.0:
      Successfully uninstalled pip-24.0
Successfully installed pip-24.1.1
WARNING: Running pip as the 'root' user can result in broken permissions and conflicting behaviour with the system package manager. It is recommended to use a virtual environment instead: https://pip.pypa.io/warnings/venv
Collecting ansible-core<2.17.0,>=2.16.0
  Downloading ansible_core-2.16.8-py3-none-any.whl.metadata (6.9 kB)
Collecting jinja2>=3.0.0 (from ansible-core<2.17.0,>=2.16.0)
  Downloading jinja2-3.1.4-py3-none-any.whl.metadata (2.6 kB)
Collecting PyYAML>=5.1 (from ansible-core<2.17.0,>=2.16.0)
  Downloading PyYAML-6.0.1-cp312-cp312-manylinux_2_17_x86_64.manylinux2014_x86_64.whl.metadata (2.1 kB)
Collecting cryptography (from ansible-core<2.17.0,>=2.16.0)
  Downloading cryptography-42.0.8-cp39-abi3-manylinux_2_28_x86_64.whl.metadata (5.3 kB)
Collecting packaging (from ansible-core<2.17.0,>=2.16.0)
  Downloading packaging-24.1-py3-none-any.whl.metadata (3.2 kB)
Collecting resolvelib<1.1.0,>=0.5.3 (from ansible-core<2.17.0,>=2.16.0)
  Downloading resolvelib-1.0.1-py2.py3-none-any.whl.metadata (4.0 kB)
Collecting MarkupSafe>=2.0 (from jinja2>=3.0.0->ansible-core<2.17.0,>=2.16.0)
  Downloading MarkupSafe-2.1.5-cp312-cp312-manylinux_2_17_x86_64.manylinux2014_x86_64.whl.metadata (3.0 kB)
Collecting cffi>=1.12 (from cryptography->ansible-core<2.17.0,>=2.16.0)
  Downloading cffi-1.16.0-cp312-cp312-manylinux_2_17_x86_64.manylinux2014_x86_64.whl.metadata (1.5 kB)
Collecting pycparser (from cffi>=1.12->cryptography->ansible-core<2.17.0,>=2.16.0)
  Downloading pycparser-2.22-py3-none-any.whl.metadata (943 bytes)
Downloading ansible_core-2.16.8-py3-none-any.whl (2.3 MB)
   ━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━ 2.3/2.3 MB 5.9 MB/s eta 0:00:00
Downloading jinja2-3.1.4-py3-none-any.whl (133 kB)
   ━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━ 133.3/133.3 kB 4.5 MB/s eta 0:00:00
Downloading PyYAML-6.0.1-cp312-cp312-manylinux_2_17_x86_64.manylinux2014_x86_64.whl (724 kB)
   ━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━ 725.0/725.0 kB 11.3 MB/s eta 0:00:00
Downloading resolvelib-1.0.1-py2.py3-none-any.whl (17 kB)
Downloading cryptography-42.0.8-cp39-abi3-manylinux_2_28_x86_64.whl (3.9 MB)
   ━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━ 3.9/3.9 MB 31.4 MB/s eta 0:00:00
Downloading packaging-24.1-py3-none-any.whl (53 kB)
   ━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━ 54.0/54.0 kB 1.7 MB/s eta 0:00:00
Downloading cffi-1.16.0-cp312-cp312-manylinux_2_17_x86_64.manylinux2014_x86_64.whl (477 kB)
   ━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━ 477.6/477.6 kB 11.2 MB/s eta 0:00:00
Downloading MarkupSafe-2.1.5-cp312-cp312-manylinux_2_17_x86_64.manylinux2014_x86_64.whl (28 kB)
Downloading pycparser-2.22-py3-none-any.whl (117 kB)
   ━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━ 117.6/117.6 kB 3.7 MB/s eta 0:00:00
Installing collected packages: resolvelib, PyYAML, pycparser, packaging, MarkupSafe, jinja2, cffi, cryptography, ansible-core
Successfully installed MarkupSafe-2.1.5 PyYAML-6.0.1 ansible-core-2.16.8 cffi-1.16.0 cryptography-42.0.8 jinja2-3.1.4 packaging-24.1 pycparser-2.22 resolvelib-1.0.1
WARNING: Running pip as the 'root' user can result in broken permissions and conflicting behaviour with the system package manager, possibly rendering your system unusable.It is recommended to use a virtual environment instead: https://pip.pypa.io/warnings/venv. Use the --root-user-action option if you know what you are doing and want to suppress this warning.
ansible-galaxy [core 2.16.8]
  config file = None
  configured module search path = ['/root/.ansible/plugins/modules', '/usr/share/ansible/plugins/modules']
  ansible python module location = /usr/local/lib/python3.12/site-packages/ansible
  ansible collection location = /root/.ansible/collections:/usr/share/ansible/collections
  executable location = /usr/local/bin/ansible-galaxy
  python version = 3.12.4 (main, Jun 27 2024, 00:07:37) [GCC 12.2.0] (/usr/local/bin/python)
  jinja version = 3.1.4
  libyaml = True
No config file found; using defaults
Starting galaxy role install process
Processing role ssbarnea.ansible_role_helloworld
Created /root/.ansible/galaxy_token
- downloading role 'ansible_role_helloworld', owned by ssbarnea
- downloading role from https://github.com/ssbarnea/ansible-role-helloworld/archive/main.tar.gz
- extracting ssbarnea.ansible_role_helloworld to /root/.ansible/roles/ssbarnea.ansible_role_helloworld
- ssbarnea.ansible_role_helloworld (main) was installed successfully

As you can see, no any issue. Same with 2.17:

docker run -it --rm python:3.12-slim bash -c "pip install --upgrade pip; pip install 'ansible-core>=2.1
7.0'; ansible-galaxy role install -vvv --force ssbarnea.ansible_role_helloworld"
Requirement already satisfied: pip in /usr/local/lib/python3.12/site-packages (24.0)
Collecting pip
  Downloading pip-24.1.1-py3-none-any.whl.metadata (3.6 kB)
Downloading pip-24.1.1-py3-none-any.whl (1.8 MB)
   ━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━ 1.8/1.8 MB 4.8 MB/s eta 0:00:00
Installing collected packages: pip
  Attempting uninstall: pip
    Found existing installation: pip 24.0
    Uninstalling pip-24.0:
      Successfully uninstalled pip-24.0
Successfully installed pip-24.1.1
WARNING: Running pip as the 'root' user can result in broken permissions and conflicting behaviour with the system package manager. It is recommended to use a virtual environment instead: https://pip.pypa.io/warnings/venv
Collecting ansible-core>=2.17.0
  Downloading ansible_core-2.17.1-py3-none-any.whl.metadata (6.9 kB)
Collecting jinja2>=3.0.0 (from ansible-core>=2.17.0)
  Downloading jinja2-3.1.4-py3-none-any.whl.metadata (2.6 kB)
Collecting PyYAML>=5.1 (from ansible-core>=2.17.0)
  Downloading PyYAML-6.0.1-cp312-cp312-manylinux_2_17_x86_64.manylinux2014_x86_64.whl.metadata (2.1 kB)
Collecting cryptography (from ansible-core>=2.17.0)
  Downloading cryptography-42.0.8-cp39-abi3-manylinux_2_28_x86_64.whl.metadata (5.3 kB)
Collecting packaging (from ansible-core>=2.17.0)
  Downloading packaging-24.1-py3-none-any.whl.metadata (3.2 kB)
Collecting resolvelib<1.1.0,>=0.5.3 (from ansible-core>=2.17.0)
  Downloading resolvelib-1.0.1-py2.py3-none-any.whl.metadata (4.0 kB)
Collecting MarkupSafe>=2.0 (from jinja2>=3.0.0->ansible-core>=2.17.0)
  Downloading MarkupSafe-2.1.5-cp312-cp312-manylinux_2_17_x86_64.manylinux2014_x86_64.whl.metadata (3.0 kB)
Collecting cffi>=1.12 (from cryptography->ansible-core>=2.17.0)
  Downloading cffi-1.16.0-cp312-cp312-manylinux_2_17_x86_64.manylinux2014_x86_64.whl.metadata (1.5 kB)
Collecting pycparser (from cffi>=1.12->cryptography->ansible-core>=2.17.0)
  Downloading pycparser-2.22-py3-none-any.whl.metadata (943 bytes)
Downloading ansible_core-2.17.1-py3-none-any.whl (2.2 MB)
   ━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━ 2.2/2.2 MB 2.3 MB/s eta 0:00:00
Downloading jinja2-3.1.4-py3-none-any.whl (133 kB)
   ━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━ 133.3/133.3 kB 2.8 MB/s eta 0:00:00
Downloading PyYAML-6.0.1-cp312-cp312-manylinux_2_17_x86_64.manylinux2014_x86_64.whl (724 kB)
   ━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━ 725.0/725.0 kB 8.1 MB/s eta 0:00:00
Downloading resolvelib-1.0.1-py2.py3-none-any.whl (17 kB)
Downloading cryptography-42.0.8-cp39-abi3-manylinux_2_28_x86_64.whl (3.9 MB)
   ━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━ 3.9/3.9 MB 12.8 MB/s eta 0:00:00
Downloading packaging-24.1-py3-none-any.whl (53 kB)
   ━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━ 54.0/54.0 kB 2.0 MB/s eta 0:00:00
Downloading cffi-1.16.0-cp312-cp312-manylinux_2_17_x86_64.manylinux2014_x86_64.whl (477 kB)
   ━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━ 477.6/477.6 kB 7.9 MB/s eta 0:00:00
Downloading MarkupSafe-2.1.5-cp312-cp312-manylinux_2_17_x86_64.manylinux2014_x86_64.whl (28 kB)
Downloading pycparser-2.22-py3-none-any.whl (117 kB)
   ━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━ 117.6/117.6 kB 3.6 MB/s eta 0:00:00
Installing collected packages: resolvelib, PyYAML, pycparser, packaging, MarkupSafe, jinja2, cffi, cryptography, ansible-core
Successfully installed MarkupSafe-2.1.5 PyYAML-6.0.1 ansible-core-2.17.1 cffi-1.16.0 cryptography-42.0.8 jinja2-3.1.4 packaging-24.1 pycparser-2.22 resolvelib-1.0.1
WARNING: Running pip as the 'root' user can result in broken permissions and conflicting behaviour with the system package manager, possibly rendering your system unusable.It is recommended to use a virtual environment instead: https://pip.pypa.io/warnings/venv. Use the --root-user-action option if you know what you are doing and want to suppress this warning.
ansible-galaxy [core 2.17.1]
  config file = None
  configured module search path = ['/root/.ansible/plugins/modules', '/usr/share/ansible/plugins/modules']
  ansible python module location = /usr/local/lib/python3.12/site-packages/ansible
  ansible collection location = /root/.ansible/collections:/usr/share/ansible/collections
  executable location = /usr/local/bin/ansible-galaxy
  python version = 3.12.4 (main, Jun 27 2024, 00:07:37) [GCC 12.2.0] (/usr/local/bin/python)
  jinja version = 3.1.4
  libyaml = True
No config file found; using defaults
Starting galaxy role install process
Processing role ssbarnea.ansible_role_helloworld
Created /root/.ansible/galaxy_token
- downloading role 'ansible_role_helloworld', owned by ssbarnea
- downloading role from https://github.com/ssbarnea/ansible-role-helloworld/archive/main.tar.gz
- extracting ssbarnea.ansible_role_helloworld to /root/.ansible/roles/ssbarnea.ansible_role_helloworld
- ssbarnea.ansible_role_helloworld (main) was installed successfully

@felixfontein
Copy link

I also tried locally with ansible-core 2.17.0 (the git tag), same result: it works.

@audgirka
Copy link
Contributor

I did try locally and it worked with ansible [core 2.16.0]

@ssbarnea ssbarnea self-assigned this Jun 27, 2024
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
Status: No status
Development

No branches or pull requests

4 participants