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

[BUG] (Self-hosted arm64 runner) Error: Error: ENOENT: no such file or directory, open '/tmp/podman-run-0/containers/auth.json' #41

Open
yuravk opened this issue Aug 1, 2024 · 3 comments
Labels
bug Something isn't working

Comments

@yuravk
Copy link

yuravk commented Aug 1, 2024

Version

redhat-actions/podman-login@v1

Describe the bug

The action fails on self-hosted runner because of the error:

Error: Error: ENOENT: no such file or directory, open '/tmp/podman-run-0/containers/auth.json'

However log in to quay.io succeed.

Steps to reproduce, workflow links, screenshots

The action runs on AlmaLinux (Red Hat binary compatible OS) arm64 based self-hosted runner:

# cat /etc/redhat-release 
AlmaLinux release 9.4 (Seafoam Ocelot)
# uname -m
aarch64

The workflow raw log:

2024-08-01T16:00:16.4675431Z ##[group]Run redhat-actions/podman-login@v1
2024-08-01T16:00:16.4676162Z with:
2024-08-01T16:00:16.4677195Z   username: ***
2024-08-01T16:00:16.4677930Z   password: ***
2024-08-01T16:00:16.4678376Z   registry: ***
2024-08-01T16:00:16.4678767Z   logout: false
2024-08-01T16:00:16.4679168Z env:
2024-08-01T16:00:16.4679522Z   LATEST_MAJOR: 9
2024-08-01T16:00:16.4679933Z   IMAGE_NAME: almalinux-bootc
2024-08-01T16:00:16.4680380Z ##[endgroup]
2024-08-01T16:00:16.6707726Z ##[group]/usr/bin/podman version
2024-08-01T16:00:16.6710120Z [command]/usr/bin/podman version
2024-08-01T16:00:16.7317432Z Client:       Podman Engine
2024-08-01T16:00:16.7343319Z Version:      4.9.4-rhel
2024-08-01T16:00:16.7420044Z API Version:  4.9.4-rhel
2024-08-01T16:00:16.7420990Z Go Version:   go1.21.11 (Red Hat 1.21.11-1.el9_4)
2024-08-01T16:00:16.7421792Z Built:        Wed Jul 24 09:17:01 2024
2024-08-01T16:00:16.7481393Z OS/Arch:      linux/arm64
2024-08-01T16:00:16.7482785Z ##[endgroup]
2024-08-01T16:00:16.7484038Z [command]/usr/bin/podman login *** -u *** -p *** --verbose
2024-08-01T16:00:17.3922216Z Used:  /run/containers/0/auth.json
2024-08-01T16:00:17.3922982Z Login Succeeded!
2024-08-01T16:00:17.3994396Z ✅ Successfully logged in to *** as ***
2024-08-01T16:00:17.3995344Z Exporting REGISTRY_AUTH_FILE=/tmp/podman-run-0/containers/auth.json
2024-08-01T16:00:17.4034249Z ##[error]Error: ENOENT: no such file or directory, open '/tmp/podman-run-0/containers/auth.json'

The workflow link:
https://github.com/yuravk/bootc-images/actions/runs/10201571885/job/28223790588#step:4:25

@yuravk yuravk added the bug Something isn't working label Aug 1, 2024
@nzwulfin
Copy link

nzwulfin commented Aug 2, 2024

I ran into this issue on a similar host and found this to work when running as root in the buildah container, added to with:

      auth_file_path: /run/containers/0/auth.json

@yuravk
Copy link
Author

yuravk commented Aug 5, 2024

Tried that as well. Fails with:

2024-08-05T07:44:52.0017077Z [command]/usr/bin/podman login *** -u *** -p *** --verbose --authfile=/run/containers/0/auth.json
2024-08-05T07:44:52.5977018Z Used:  /run/containers/0/auth.json
2024-08-05T07:44:52.6026821Z Login Succeeded!
2024-08-05T07:44:52.6054295Z ✅ Successfully logged in to *** as ***
2024-08-05T07:44:52.6055253Z Exporting REGISTRY_AUTH_FILE=/run/containers/0/auth.json
2024-08-05T07:44:52.6057019Z ✍️ Writing registry credentials to "/root/.docker/config.json"
2024-08-05T07:44:52.6104257Z ##[error]Error: ENOENT: no such file or directory, open '/root/.docker/config.json'

The workflow: https://github.com/yuravk/bootc-images/actions/runs/10244618540/job/28337995308

@nzwulfin
Copy link

nzwulfin commented Aug 5, 2024

I reported an issue on that error to (#42 ), my current workaround there is to use a local custom buildah container that includes this line from (#39 )

RUN echo "{ \"auths\": {} }" > $HOME/.docker/config.json

Then I use that container as the runner instead of the upstream buildah stable image on quay

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