act: m1: act fails to pull with unauthorized: incorrect username or password
Discussed in https://github.com/nektos/act/discussions/1165
<div type='discussions-op-text'>Originally posted by ssbarnea May 15, 2022 I am on MacOS M1 and act failed to even pull the container reporting not being able to login to docker registry, but docker works correctly and it is able to pull.
$ act
WARN ⚠ You are using Apple M1 chip and you have not specified container architecture, you might encounter issues while running act. If so, try running it with '--container-architecture linux/amd64'. ⚠
ERRO[0000] Unable to interpolate expression 'format('{0}', matrix.env.TOXENV)': Unable to dereference 'toxenv' on non-struct 'invalid'
ERRO[0000] 'runs-on' key not defined in push/ack
ERRO[0000] 'runs-on' key not defined in push/ack
[tox/lint-1 ] 🧪 Matrix: map[env:map[TOXENV:lint] os:ubuntu-20.04 python-version:3.9]
[tox/py-3 ] 🧪 Matrix: map[env:map[TOXENV:py] os:ubuntu-20.04 python-version:3.9]
[tox/packaging-2] 🧪 Matrix: map[env:map[TOXENV:packaging] os:ubuntu-20.04 python-version:3.9]
[tox/py-3 ] 🚀 Start image=node:16-buster-slim
[tox/packaging-2] 🚀 Start image=node:16-buster-slim
[tox/lint-1 ] 🚀 Start image=node:16-buster-slim
[tox/py-3 ] 🐳 docker pull image=node:16-buster-slim platform= username= forcePull=false
[tox/packaging-2] 🐳 docker pull image=node:16-buster-slim platform= username= forcePull=false
[tox/lint-1 ] 🐳 docker pull image=node:16-buster-slim platform= username= forcePull=false
Error: Error response from daemon: Head "https://registry-1.docker.io/v2/library/node/manifests/16-buster-slim": unauthorized: incorrect username or password
FAIL: 1
ssbarnea@m1: ~/c/schemastorepy main
$ docker pull node:16-buster-slim
16-buster-slim: Pulling from library/node
383d573fdcf2: Pull complete
a3942ef45b19: Pull complete
233507218b05: Pull complete
d14f918387bf: Pull complete
9f12e5ac2608: Pull complete
Digest: sha256:e5936cf8dbbb3c0d9d337c0e9f23e56e00b7e62280a8a617d12adfdda8ca9f11
Status: Downloaded newer image for node:16-buster-slim
docker.io/library/node:16-buster-slim
ssbarnea@m1: ~/c/schemastorepy main
$ docker --version
Docker version 20.10.14, build a224086
```</div>
About this issue
- Original URL
- State: open
- Created 2 years ago
- Reactions: 14
- Comments: 19 (11 by maintainers)
I am not using an m1, but I hit a similar error (even earlier in the process):
I briefly checked my rate-limit:
I can manually pull the image too:
Once I pulled the image myself,
act
continues to work.+1 on Ubuntu 22.04 on WSL2 using Docker Desktop 4.12.0 (85629), when trying to pull
node:16-buster-slim
withact
. Works fine withdocker pull node:16-buster-slim
.Unsuccessfully tried to pass secrets with:
--secret-file
flag--env-file
flag.yml
fileThe only way it worked was by directly passing the values with the
-s
flag:More information about my system is below:
Output of
lsb_release -a
command:The output of the
uname
command:The output of the
docker version
command:+1 on Windows as well. Using Docker Desktop 4.8.2 (79419)
Why can’t act just issue the “docker pull” command and delegate the responsibility to the already authenticated docker?
@sukkergris This is not your only problem,
This is your more relevant problem due to beeing on windows:
See here https://github.com/nektos/act/issues/2074
I would guess that the password act reads out of docker login in docker desktop is a placeholder instead of the actual password (which is stored in a credentials store) Act versions starting with v0.2.46 (1 June 2023 / https://github.com/nektos/act/pull/1774) should automatically try to pull without credentials, before failing to pull.
I’ll give it a shot. I did solve it by manually pulling the image and setting --pull=false in the .actrc though.