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

Error: Error response from daemon: Head "https://registry-1.docker.io/v2/catthehacker/ubuntu/manifests/act-latest": unauthorized: incorrect username or password #1769

Closed
PavelA85 opened this issue Apr 25, 2023 · 6 comments · Fixed by #1774
Labels
kind/bug Something isn't working

Comments

@PavelA85
Copy link

PavelA85 commented Apr 25, 2023

Bug report info

act version:            0.2.44
GOOS:                   windows
GOARCH:                 amd64
NumCPU:                 16
Docker host:            DOCKER_HOST environment variable is unset/empty.
Sockets found:
        \\.\pipe\docker_engine
Config files:
        C:\Users\PavelAgejkin\.actrc:
                -P ubuntu-latest=catthehacker/ubuntu:act-latest
                -P ubuntu-22.04=catthehacker/ubuntu:act-22.04
                -P ubuntu-20.04=catthehacker/ubuntu:act-20.04
                -P ubuntu-18.04=catthehacker/ubuntu:act-18.04
Build info:
        Go version:            go1.18.10
        Module path:           github.com/nektos/act
        Main version:          (devel)
        Main path:             github.com/nektos/act
        Main checksum:
        Build settings:
                -compiler:            gc
                -ldflags:             -s -w -X main.version=0.2.44 -X main.commit=220d6f1251aea75c378e5a98546f43cd918e1892 -X main.date=2023-04-01T02:18:17Z -X main.builtBy=goreleaser
                CGO_ENABLED:          0
                GOARCH:               amd64
                GOOS:                 windows
                GOAMD64:              v1
                vcs:                  git
                vcs.revision:         220d6f1251aea75c378e5a98546f43cd918e1892
                vcs.time:             2023-04-01T02:17:52Z
                vcs.modified:         false
Docker Engine:
        Engine version:        20.10.24
        Engine runtime:        runc
        Cgroup version:        2
        Cgroup driver:         cgroupfs
        Storage driver:        overlay2
        Registry URI:          https://index.docker.io/v1/
        OS:                    Docker Desktop
        OS type:               linux
        OS version:
        OS arch:               x86_64
        OS kernel:             5.15.90.1-microsoft-standard-WSL2
        OS CPU:                2
        OS memory:             2913 MB
        Security options:
                name=seccomp,profile=default
                name=cgroupns

Command used with act

act pull_request

Describe issue

I have installed act long time ago and it worked as expected, but now when I try to execute act I get error:

[dotnet builder/DotNetBuilder] �  Start image=catthehacker/ubuntu:act-latest
[dotnet builder/DotNetBuilder]   �  docker pull image=catthehacker/ubuntu:act-latest platform= username= forcePull=true
Error: Error response from daemon: Head "https://registry-1.docker.io/v2/catthehacker/ubuntu/manifests/act-latest": unauthorized: incorrect username or password

I tried fixes from #1248
docker login ghcr.io and docker logout ghcr.io
But still same issue

Link to GitHub repository

No response

Workflow content

name: dotnet builder

on:
  pull_request_target:
    types: [ opened, edited, reopened, synchronize ]
  pull_request:
    types: [ opened, edited, reopened, synchronize ]
  push:
    branches-ignore:
      - 'sync/**'

jobs:
  DotNetBuilder:
    runs-on: ubuntu-latest

    steps:
      - name: Dump GitHub context
        env:
          GITHUB_CONTEXT: ${{ toJson(github) }}
        run: |
          echo "$GITHUB_CONTEXT"

      - name: git checkout PR
        if: github.event_name == 'pull_request' || github.event_name == 'pull_request_target'
        run: |
          cd $GITHUB_WORKSPACE
          git init
          git fetch --force \
            --progress \
            -- https://user:${{ secrets.GITHUB_TOKEN }}@github.com/*********/************** \
            +refs/heads/release:refs/remotes/origin/release \
            +refs/heads/develop:refs/remotes/origin/develop \
            +refs/heads/{{ github.event.pull_request.base.ref }}:refs/remotes/origin/{{ github.event.pull_request.base.ref }} \
            +refs/pull/${{ github.event.pull_request.number }}/*:refs/remotes/origin/pr/${{ github.event.pull_request.number }}/*
          git checkout origin/pr/${{ github.event.pull_request.number }}/merge 
          git show-ref

Relevant log output

λ act pull_request -v
time="2023-04-25T17:49:02+03:00" level=debug msg="Loading environment from C:\\Projects\\MyProject\\.env"
time="2023-04-25T17:49:02+03:00" level=debug msg="Conditional GET for notices etag=7f63cf74-b2af-4e60-912f-c5531fdabaf0"
time="2023-04-25T17:49:02+03:00" level=debug msg="Loading action inputs from C:\\Projects\\MyProject\\.input"
time="2023-04-25T17:49:02+03:00" level=debug msg="Loading secrets from C:\\Projects\\MyProject\\.secrets"
time="2023-04-25T17:49:02+03:00" level=debug msg="Evaluated matrix inclusions: map[]"
time="2023-04-25T17:49:02+03:00" level=debug msg="Loading workflows from 'C:\\Projects\\MyProject\\.github\\workflows'"
time="2023-04-25T17:49:02+03:00" level=debug msg="Loading workflows recursively"
time="2023-04-25T17:49:02+03:00" level=debug msg="Found workflow 'builder.yml' in 'C:\\Projects\\MyProject\\.github\\workflows\\builder.yml'"
time="2023-04-25T17:49:02+03:00" level=debug msg="Found workflow 'pr.json' in 'C:\\Projects\\MyProject\\.github\\workflows\\pr.json'"
time="2023-04-25T17:49:02+03:00" level=debug msg="Found workflow 'syncComposer.yml' in 'C:\\Projects\\MyProject\\.github\\workflows\\syncComposer.yml'"
time="2023-04-25T17:49:02+03:00" level=debug msg="Found workflow 'syncDev.yml' in 'C:\\Projects\\MyProject\\.github\\workflows\\syncDev.yml'"
time="2023-04-25T17:49:02+03:00" level=debug msg="Found workflow 'template.yml' in 'C:\\Projects\\MyProject\\.github\\workflows\\template.yml'"
time="2023-04-25T17:49:02+03:00" level=debug msg="Found workflow 'updateNuGet.yml' in 'C:\\Projects\\MyProject\\.github\\workflows\\updateNuGet.yml'"
time="2023-04-25T17:49:02+03:00" level=debug msg="Reading workflow 'C:\\Projects\\MyProject\\.github\\workflows\\builder.yml'"
time="2023-04-25T17:49:02+03:00" level=debug msg="Reading workflow 'C:\\Projects\\MyProject\\.github\\workflows\\syncComposer.yml'"
time="2023-04-25T17:49:02+03:00" level=debug msg="Reading workflow 'C:\\Projects\\MyProject\\.github\\workflows\\syncDev.yml'"
time="2023-04-25T17:49:02+03:00" level=debug msg="Reading workflow 'C:\\Projects\\MyProject\\.github\\workflows\\template.yml'"
time="2023-04-25T17:49:02+03:00" level=debug msg="Reading workflow 'C:\\Projects\\MyProject\\.github\\workflows\\updateNuGet.yml'"
time="2023-04-25T17:49:02+03:00" level=debug msg="Using first passed in arguments event for filtering: pull_request"
time="2023-04-25T17:49:02+03:00" level=debug msg="Preparing plan for a event: pull_request"
time="2023-04-25T17:49:02+03:00" level=debug msg="Using first passed in arguments event: pull_request"
time="2023-04-25T17:49:02+03:00" level=debug msg="Planning jobs for event: pull_request"
time="2023-04-25T17:49:02+03:00" level=debug msg="Final matrix after applying user inclusions '[map[]]'"
time="2023-04-25T17:49:02+03:00" level=debug msg="Found revision: 6034231b5ca9026a8e4c48be90664de8fba0b4c6"
[dotnet builder/DotNetBuilder] [DEBUG] evaluating expression 'success()'
[dotnet builder/DotNetBuilder] [DEBUG] expression 'success()' evaluated to 'true'
[dotnet builder/DotNetBuilder] �  Start image=catthehacker/ubuntu:act-latest
[dotnet builder/DotNetBuilder]   �  docker pull image=catthehacker/ubuntu:act-latest platform= username= forcePull=true
[dotnet builder/DotNetBuilder] [DEBUG]   �  docker pull catthehacker/ubuntu:act-latest
[dotnet builder/DotNetBuilder] [DEBUG] pulling image 'docker.io/catthehacker/ubuntu:act-latest' ()
time="2023-04-25T17:49:03+03:00" level=debug msg="Saving notices etag=7f63cf74-b2af-4e60-912f-c5531fdabaf0"
time="2023-04-25T17:49:03+03:00" level=debug msg="No new notices"
Error: Error response from daemon: Head "https://registry-1.docker.io/v2/catthehacker/ubuntu/manifests/act-latest": toomanyrequests: too many failed login attempts for username or IP address


### Additional information

_No response_
@PavelA85 PavelA85 added the kind/bug Something isn't working label Apr 25, 2023
@PavelA85
Copy link
Author

PavelA85 commented Apr 25, 2023

I see toomanyrequests: too many failed login attempts for username or IP address
I will retry a little bit later.

Updated verbose response:

λ act pull_request -v
time="2023-04-25T17:56:12+03:00" level=debug msg="Loading environment from C:\\Projects\\MyProject\\.env"
time="2023-04-25T17:56:12+03:00" level=debug msg="Conditional GET for notices etag=7f63cf74-b2af-4e60-912f-c5531fdabaf0"
time="2023-04-25T17:56:12+03:00" level=debug msg="Loading action inputs from C:\\Projects\\MyProject\\.input"
time="2023-04-25T17:56:12+03:00" level=debug msg="Loading secrets from C:\\Projects\\MyProject\\.secrets"
time="2023-04-25T17:56:12+03:00" level=debug msg="Evaluated matrix inclusions: map[]"
time="2023-04-25T17:56:12+03:00" level=debug msg="Loading workflows from 'C:\\Projects\\MyProject\\.github\\workflows'"
time="2023-04-25T17:56:12+03:00" level=debug msg="Loading workflows recursively"
time="2023-04-25T17:56:12+03:00" level=debug msg="Found workflow 'builder.yml' in 'C:\\Projects\\MyProject\\.github\\workflows\\builder.yml'"
time="2023-04-25T17:56:12+03:00" level=debug msg="Found workflow 'pr.json' in 'C:\\Projects\\MyProject\\.github\\workflows\\pr.json'"
time="2023-04-25T17:56:12+03:00" level=debug msg="Found workflow 'syncComposer.yml' in 'C:\\Projects\\MyProject\\.github\\workflows\\syncComposer.yml'"
time="2023-04-25T17:56:12+03:00" level=debug msg="Found workflow 'syncDev.yml' in 'C:\\Projects\\MyProject\\.github\\workflows\\syncDev.yml'"
time="2023-04-25T17:56:12+03:00" level=debug msg="Found workflow 'template.yml' in 'C:\\Projects\\MyProject\\.github\\workflows\\template.yml'"
time="2023-04-25T17:56:12+03:00" level=debug msg="Found workflow 'updateNuGet.yml' in 'C:\\Projects\\MyProject\\.github\\workflows\\updateNuGet.yml'"
time="2023-04-25T17:56:12+03:00" level=debug msg="Reading workflow 'C:\\Projects\\MyProject\\.github\\workflows\\builder.yml'"
time="2023-04-25T17:56:12+03:00" level=debug msg="Reading workflow 'C:\\Projects\\MyProject\\.github\\workflows\\syncComposer.yml'"
time="2023-04-25T17:56:12+03:00" level=debug msg="Reading workflow 'C:\\Projects\\MyProject\\.github\\workflows\\syncDev.yml'"
time="2023-04-25T17:56:12+03:00" level=debug msg="Reading workflow 'C:\\Projects\\MyProject\\.github\\workflows\\template.yml'"
time="2023-04-25T17:56:12+03:00" level=debug msg="Reading workflow 'C:\\Projects\\MyProject\\.github\\workflows\\updateNuGet.yml'"
time="2023-04-25T17:56:12+03:00" level=debug msg="Using first passed in arguments event for filtering: pull_request"
time="2023-04-25T17:56:12+03:00" level=debug msg="Preparing plan for a event: pull_request"
time="2023-04-25T17:56:12+03:00" level=debug msg="Using first passed in arguments event: pull_request"
time="2023-04-25T17:56:12+03:00" level=debug msg="Planning jobs for event: pull_request"
time="2023-04-25T17:56:12+03:00" level=debug msg="Final matrix after applying user inclusions '[map[]]'"
time="2023-04-25T17:56:12+03:00" level=debug msg="Found revision: 6034231b5ca9026a8e4c48be90664de8fba0b4c6"
[dotnet builder/DotNetBuilder] [DEBUG] evaluating expression 'success()'
[dotnet builder/DotNetBuilder] [DEBUG] expression 'success()' evaluated to 'true'
[dotnet builder/DotNetBuilder] �  Start image=catthehacker/ubuntu:act-latest
[dotnet builder/DotNetBuilder]   �  docker pull image=catthehacker/ubuntu:act-latest platform= username= forcePull=true
[dotnet builder/DotNetBuilder] [DEBUG]   �  docker pull catthehacker/ubuntu:act-latest
[dotnet builder/DotNetBuilder] [DEBUG] pulling image 'docker.io/catthehacker/ubuntu:act-latest' ()
time="2023-04-25T17:56:13+03:00" level=debug msg="Saving notices etag=7f63cf74-b2af-4e60-912f-c5531fdabaf0"
time="2023-04-25T17:56:13+03:00" level=debug msg="No new notices"
Error: Error response from daemon: Head "https://registry-1.docker.io/v2/catthehacker/ubuntu/manifests/act-latest": unauthorized: incorrect username or password

@sebastien-belin-adp
Copy link

It seems that this happens since version 0.2.41 (b00babd) where docker forcePull has been set to true.
As a workaround you can try to use --pull=false when running your job.
In your case I suppose that will be something like act --pull=false pull_request

@PavelA85
Copy link
Author

λ act --pull=false pull_request
[dotnet builder/DotNetBuilder] �  Start image=catthehacker/ubuntu:act-latest
[dotnet builder/DotNetBuilder]   �  docker pull image=catthehacker/ubuntu:act-latest platform= username= forcePull=false
Error: Error response from daemon: Head "https://registry-1.docker.io/v2/catthehacker/ubuntu/manifests/act-latest": unauthorized: incorrect username or password

Still same issue.

@sebastien-belin-adp
Copy link

Sorry that didn't work, maybe you should try to get the docker image via command line first.
I already had the image locally when I got it working with this flag.
So assuming you are using ubuntu latest you could do something like docker pull catthehacker/ubuntu:act-latest

@PavelA85
Copy link
Author

Thanks, that helped.

@ChristopherHX
Copy link
Contributor

I saw this problem has no solution for a long time (see discussion #1165), while I never had problems myself.

Can you try this change #1774?

It logs now if it uses DockerAuthConfig credentials and if it fails pulling while authenticated it removes the crendentials and tries again. However this still means you should remove stale docker auth data whereever it is located.

You shouldn't need to disable pulling images.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
kind/bug Something isn't working
Projects
None yet
Development

Successfully merging a pull request may close this issue.

3 participants