最新消息:雨落星辰是一个专注网站SEO优化、网站SEO诊断、搜索引擎研究、网络营销推广、网站策划运营及站长类的自媒体原创博客

linux - usrlocalbin not on path for github actions, rockylinux permission denied on path - Stack Overflow

programmeradmin1浏览0评论

So, I've got some RockyLinux 8, and then 9.3 to 9.4 and I think something has changed in 9.5.

I deploy github action runners to a small fleet of RockyLinux machines via Ansible. They run as a user called github.

The workflow performs a pip3 install of my build tools and environment, which includes a few packages like yq and pytest.

It seems these install to a recommended path of /usr/local/bin/ however its started failing in the github workflow throwing the following error.

scripts/push-image.sh: line 13: yq: command not found

Ultimately, what I've found is that /usr/local/bin/ is not on the PATH of the github action step. But then also, that /usr/local/bin isn't accessible to anyone on the system, ie the github user. My understanding was that this is the best/recommended path for global tools/binaries and many install to that. Logging in as the user, I found I'd get permission denied to that path.

A chmod 0755 to /usr/local/bin has corrected this, but now in GHA I need to export my PATH variable to include this path which I haven't needed to before.

Am I going crazy? It feels a bit like a permission change in linux + github actions change not adding the path anymore?

Note, it doesn't use venvs in the project which i think is a solution id need to go an update the project to consume properly.

与本文相关的文章

发布评论

评论列表(0)

  1. 暂无评论