[GH-ISSUE #959] Issue: username and password for container.credentials are not picked up (pull access denied) #563

Closed
opened 2026-03-01 21:44:32 +03:00 by kerem · 1 comment
Owner

Originally created by @thromera on GitHub (Jan 18, 2022).
Original GitHub issue: https://github.com/nektos/act/issues/959

System information

  • Operating System: macOS
  • Architecture: X64 (64-bit)
  • Apple M1: yes
  • Docker version: 20.10.12
  • Docker image used in act: ubuntu-20.04
  • act version: 0.2.25

Expected behaviour

When using a container image from a private repository, with the credentials passed with container.credentials, the credentials should be used with docker pull

Actual behaviour

The credentials are not picked up properly, and the resulting command line seems to indicate that.

act --workflows .github/workflows/test_rspec.yml --container-architecture linux/amd64 --rebuild --insecure-secrets -v

[test_rspec.yml/test-rspec]   🐳  docker pull image=myrepo/app-base:latest platform=linux/amd64 username= forcePull=false
[test_rspec.yml/test-rspec]   🐳  docker pull myrepo/app-base:latest

I triple checked the image name and the credentials, they are correct. (In a previous step, I build the image and push it to the same repository, using the docker/login-action@v1 and docker/build-push-action@v2 and the build appear in DockerHub.

Workflow and/or repository

workflow
name: rspec
on: [push]

jobs:
  test_rspec:
    runs-on: ubuntu-20.04
    container:
      image: myrepo/app-base:latest
      credentials:
        username: username
        password: password
    steps:
      - name: testing
        run: |
          echo All done!

Steps to reproduce

Run act --workflows .github/workflows/test_rspec.yml --container-architecture linux/amd64 --rebuild --insecure-secrets with correct username and password, the image cannot be pulled

act output

Log
DEBU[0000] Loading environment from /Users/erowlin/work/repo/.env
DEBU[0000] Loading secrets from /Users/erowlin/work/repo/.secrets
DEBU[0000] Loading workflow '/Users/erowlin/work/repo/.github/workflows/test_rspec.yml'
DEBU[0000] Reading workflow '/Users/erowlin/work/repo/.github/workflows/test_rspec.yml'
DEBU[0000] Correcting if statements '/Users/erowlin/work/repo/.github/workflows/test_rspec.yml'
DEBU[0000] Planning event: push
DEBU[0000] Loading slug from git directory '/Users/erowlin/work/repo/.git'
DEBU[0000] Found revision: 6cfcd95190408c0c5a91b4bc9879fa3da2ce8047
DEBU[0000] Loading revision from git directory '/Users/erowlin/work/repo/.git'
DEBU[0000] Found revision: 6cfcd95190408c0c5a91b4bc9879fa3da2ce8047
DEBU[0000] HEAD points to '6cfcd95190408c0c5a91b4bc9879fa3da2ce8047'
DEBU[0000] using github ref: refs/heads/tr/docker
DEBU[0000] context env => map[ACT:true]
DEBU[0000] context needs => map[]
[test_rspec.yml/test-rspec] 🚀  Start image=myrepo/app-base:latest
DEBU[0000] Loading slug from git directory '/Users/erowlin/work/repo/.git'
DEBU[0000] Found revision: 6cfcd95190408c0c5a91b4bc9879fa3da2ce8047
DEBU[0000] Loading revision from git directory '/Users/erowlin/work/repo/.git'
DEBU[0000] Found revision: 6cfcd95190408c0c5a91b4bc9879fa3da2ce8047
DEBU[0000] HEAD points to '6cfcd95190408c0c5a91b4bc9879fa3da2ce8047'
DEBU[0000] using github ref: refs/heads/tr/docker
[test_rspec.yml/test-rspec]   🐳  docker pull image=myrepo/app-base:latest platform=linux/amd64 username= forcePull=false
[test_rspec.yml/test-rspec]   🐳  docker pull myrepo/app-base:latest
DEBU[0000] Image exists? false
[test_rspec.yml/test-rspec] pulling image 'docker.io/myrepo/app-base:latest' (linux/amd64)
DEBU[0001] Error response from daemon: pull access denied for myrepo/app-base, repository does not exist or may require 'docker login': denied: requested access to the resource is denied
DEBU[0001] Error response from daemon: pull access denied for myrepo/app-base, repository does not exist or may require 'docker login': denied: requested access to the resource is denied
DEBU[0001] Error response from daemon: pull access denied for myrepo/app-base, repository does not exist or may require 'docker login': denied: requested access to the resource is denied
DEBU[0001] Error response from daemon: pull access denied for myrepo/app-base, repository does not exist or may require 'docker login': denied: requested access to the resource is denied
DEBU[0001] Error response from daemon: pull access denied for myrepo/app-base, repository does not exist or may require 'docker login': denied: requested access to the resource is denied
DEBU[0001] Error response from daemon: pull access denied for myrepo/app-base, repository does not exist or may require 'docker login': denied: requested access to the resource is denied
DEBU[0001] Error response from daemon: pull access denied for myrepo/app-base, repository does not exist or may require 'docker login': denied: requested access to the resource is denied
DEBU[0001] Error response from daemon: pull access denied for myrepo/app-base, repository does not exist or may require 'docker login': denied: requested access to the resource is denied
DEBU[0001] Error response from daemon: pull access denied for myrepo/app-base, repository does not exist or may require 'docker login': denied: requested access to the resource is denied
DEBU[0001] Error response from daemon: pull access denied for myrepo/app-base, repository does not exist or may require 'docker login': denied: requested access to the resource is denied
DEBU[0001] Loading slug from git directory '/Users/erowlin/work/repo/.git'
DEBU[0001] Found revision: 6cfcd95190408c0c5a91b4bc9879fa3da2ce8047
DEBU[0001] Loading revision from git directory '/Users/erowlin/work/repo/.git'
DEBU[0001] Found revision: 6cfcd95190408c0c5a91b4bc9879fa3da2ce8047
DEBU[0001] HEAD points to '6cfcd95190408c0c5a91b4bc9879fa3da2ce8047'
DEBU[0001] using github ref: refs/heads/tr/docker
DEBU[0001] context env => map[ACT:true]
DEBU[0001] context needs => map[]
Error: Error response from daemon: pull access denied for myrepo/app-base, repository does not exist or may require 'docker login': denied: requested access to the resource is denied
Originally created by @thromera on GitHub (Jan 18, 2022). Original GitHub issue: https://github.com/nektos/act/issues/959 <!-- - Make sure you are able to reproduce it on the [latest version](https://github.com/nektos/act/releases) - Search the existing issues. - Refer to [README](https://github.com/nektos/act/blob/master/README.md). --> ## System information - Operating System: macOS - Architecture: X64 (64-bit) - Apple M1: yes - Docker version: 20.10.12 - Docker image used in `act`: ubuntu-20.04 - `act` version: 0.2.25 ## Expected behaviour When using a container image from a private repository, with the credentials passed with [`container.credentials`](https://docs.github.com/en/actions/using-workflows/workflow-syntax-for-github-actions#jobsjob_idcontainercredentials), the credentials should be used with `docker pull` ## Actual behaviour The credentials are not picked up properly, and the resulting command line seems to indicate that. ```bash act --workflows .github/workflows/test_rspec.yml --container-architecture linux/amd64 --rebuild --insecure-secrets -v [test_rspec.yml/test-rspec] 🐳 docker pull image=myrepo/app-base:latest platform=linux/amd64 username= forcePull=false [test_rspec.yml/test-rspec] 🐳 docker pull myrepo/app-base:latest ``` I triple checked the image name and the credentials, they are correct. (In a previous step, I build the image and push it to the same repository, using the `docker/login-action@v1` and `docker/build-push-action@v2` and the build appear in DockerHub. ## Workflow and/or repository <details> <summary>workflow</summary> ```none name: rspec on: [push] jobs: test_rspec: runs-on: ubuntu-20.04 container: image: myrepo/app-base:latest credentials: username: username password: password steps: - name: testing run: | echo All done! ``` </details> ## Steps to reproduce Run `act --workflows .github/workflows/test_rspec.yml --container-architecture linux/amd64 --rebuild --insecure-secrets` with correct username and password, the image cannot be pulled <!-- - Make sure to include full command with parameters you used to run `act`, example: 1. Clone example repo (https://github.com/cplee/github-actions-demo) 2. Enter cloned repo directory 3. Run `act -s SUPER_SECRET=im-a-value` --> ## `act` output <details> <summary>Log</summary> ```none DEBU[0000] Loading environment from /Users/erowlin/work/repo/.env DEBU[0000] Loading secrets from /Users/erowlin/work/repo/.secrets DEBU[0000] Loading workflow '/Users/erowlin/work/repo/.github/workflows/test_rspec.yml' DEBU[0000] Reading workflow '/Users/erowlin/work/repo/.github/workflows/test_rspec.yml' DEBU[0000] Correcting if statements '/Users/erowlin/work/repo/.github/workflows/test_rspec.yml' DEBU[0000] Planning event: push DEBU[0000] Loading slug from git directory '/Users/erowlin/work/repo/.git' DEBU[0000] Found revision: 6cfcd95190408c0c5a91b4bc9879fa3da2ce8047 DEBU[0000] Loading revision from git directory '/Users/erowlin/work/repo/.git' DEBU[0000] Found revision: 6cfcd95190408c0c5a91b4bc9879fa3da2ce8047 DEBU[0000] HEAD points to '6cfcd95190408c0c5a91b4bc9879fa3da2ce8047' DEBU[0000] using github ref: refs/heads/tr/docker DEBU[0000] context env => map[ACT:true] DEBU[0000] context needs => map[] [test_rspec.yml/test-rspec] 🚀 Start image=myrepo/app-base:latest DEBU[0000] Loading slug from git directory '/Users/erowlin/work/repo/.git' DEBU[0000] Found revision: 6cfcd95190408c0c5a91b4bc9879fa3da2ce8047 DEBU[0000] Loading revision from git directory '/Users/erowlin/work/repo/.git' DEBU[0000] Found revision: 6cfcd95190408c0c5a91b4bc9879fa3da2ce8047 DEBU[0000] HEAD points to '6cfcd95190408c0c5a91b4bc9879fa3da2ce8047' DEBU[0000] using github ref: refs/heads/tr/docker [test_rspec.yml/test-rspec] 🐳 docker pull image=myrepo/app-base:latest platform=linux/amd64 username= forcePull=false [test_rspec.yml/test-rspec] 🐳 docker pull myrepo/app-base:latest DEBU[0000] Image exists? false [test_rspec.yml/test-rspec] pulling image 'docker.io/myrepo/app-base:latest' (linux/amd64) DEBU[0001] Error response from daemon: pull access denied for myrepo/app-base, repository does not exist or may require 'docker login': denied: requested access to the resource is denied DEBU[0001] Error response from daemon: pull access denied for myrepo/app-base, repository does not exist or may require 'docker login': denied: requested access to the resource is denied DEBU[0001] Error response from daemon: pull access denied for myrepo/app-base, repository does not exist or may require 'docker login': denied: requested access to the resource is denied DEBU[0001] Error response from daemon: pull access denied for myrepo/app-base, repository does not exist or may require 'docker login': denied: requested access to the resource is denied DEBU[0001] Error response from daemon: pull access denied for myrepo/app-base, repository does not exist or may require 'docker login': denied: requested access to the resource is denied DEBU[0001] Error response from daemon: pull access denied for myrepo/app-base, repository does not exist or may require 'docker login': denied: requested access to the resource is denied DEBU[0001] Error response from daemon: pull access denied for myrepo/app-base, repository does not exist or may require 'docker login': denied: requested access to the resource is denied DEBU[0001] Error response from daemon: pull access denied for myrepo/app-base, repository does not exist or may require 'docker login': denied: requested access to the resource is denied DEBU[0001] Error response from daemon: pull access denied for myrepo/app-base, repository does not exist or may require 'docker login': denied: requested access to the resource is denied DEBU[0001] Error response from daemon: pull access denied for myrepo/app-base, repository does not exist or may require 'docker login': denied: requested access to the resource is denied DEBU[0001] Loading slug from git directory '/Users/erowlin/work/repo/.git' DEBU[0001] Found revision: 6cfcd95190408c0c5a91b4bc9879fa3da2ce8047 DEBU[0001] Loading revision from git directory '/Users/erowlin/work/repo/.git' DEBU[0001] Found revision: 6cfcd95190408c0c5a91b4bc9879fa3da2ce8047 DEBU[0001] HEAD points to '6cfcd95190408c0c5a91b4bc9879fa3da2ce8047' DEBU[0001] using github ref: refs/heads/tr/docker DEBU[0001] context env => map[ACT:true] DEBU[0001] context needs => map[] Error: Error response from daemon: pull access denied for myrepo/app-base, repository does not exist or may require 'docker login': denied: requested access to the resource is denied ``` </details>
kerem 2026-03-01 21:44:32 +03:00
  • closed this issue
  • added the
    kind/bug
    label
Author
Owner

@catthehacker commented on GitHub (Jan 18, 2022):

Already fixed in github.com/nektos/act@5bdb9ed0fd

<!-- gh-comment-id:1015412623 --> @catthehacker commented on GitHub (Jan 18, 2022): Already fixed in https://github.com/nektos/act/commit/5bdb9ed0fd203c2f50e191bca90831b2a8f96cbc
Sign in to join this conversation.
No milestone
No project
No assignees
1 participant
Notifications
Due date
The due date is invalid or out of range. Please use the format "yyyy-mm-dd".

No due date set.

Dependencies

No dependencies set.

Reference
starred/act#563
No description provided.