question-mark
Stuck on an issue?

Lightrun Answers was designed to reduce the constant googling that comes with debugging 3rd party libraries. It collects links to all the places you might be looking at while hunting down a tough bug.

And, if you’re still stuck at the end, we’re happy to hop on a call to see how we can help out.

Docker is unable to access Github registry during action in self-hosted runner

See original GitHub issue

Behaviour

Steps to reproduce this issue

  1. Create personal token
  2. Deploy token with repository
  3. Trigger action

Expected behaviour

During “Starting job container” Docker logs into ghcr.io and syncs container before next step

Actual behaviour

##[debug]Evaluating condition for step: 'Initialize containers'
##[debug]Evaluating: success()
##[debug]Evaluating success:
##[debug]=> true
##[debug]Result: true
##[debug]Starting: Initialize containers
##[debug]Register post job cleanup for stopping/deleting containers.
Checking docker version
  /usr/bin/docker version --format '{{.Server.APIVersion}}'
  '1.39'
  Docker daemon API version: '1.39'
  /usr/bin/docker version --format '{{.Client.APIVersion}}'
  '1.39'
  Docker client API version: '1.39'
Clean up resources from previous jobs
  /usr/bin/docker ps --all --quiet --no-trunc --filter "label=82336b"
  /usr/bin/docker network prune --force --filter "label=82336b"
Create local container network
  /usr/bin/docker network create --label 82336b github_network_680e367e3ca74e168b62ad703860f04f
  c338b7456f973cc0cba2cff9a77691bb7d90bb85c7022adcf60a88592397fa7b
Starting job container
  /usr/bin/docker --config /home/holger/actions-runner/_work/_temp/.docker_e54ffea8-e56e-460e-867a-bc788bd55961 login ghcr.io -u hjokunbus --password-stdin
  Error: Docker login for 'ghcr.io' failed with exit code 1
  ##[debug]System.InvalidOperationException: Docker login for 'ghcr.io' failed with exit code 1
  ##[debug]   at GitHub.Runner.Worker.ContainerOperationProvider.ContainerRegistryLogin(IExecutionContext executionContext, ContainerInfo container)
  ##[debug]   at GitHub.Runner.Worker.ContainerOperationProvider.StartContainerAsync(IExecutionContext executionContext, ContainerInfo container)
  ##[debug]   at GitHub.Runner.Worker.ContainerOperationProvider.StartContainersAsync(IExecutionContext executionContext, Object data)
  ##[debug]   at GitHub.Runner.Worker.JobExtensionRunner.RunAsync()
  ##[debug]   at GitHub.Runner.Worker.StepsRunner.RunStepAsync(IStep step, CancellationToken jobCancellationToken)
  ##[debug]Finishing: Initialize containers

This broke at August 26th while working just fine before. The secret has not expired and also still works for manual login into ghcr.io. Only the action fails to perform. Re-runs of previously successful actions fail, as well.

Please note that there already is a feedback about this in the GitHub community that for the last days nobody had responded to.

Configuration

name: Clang-Tidy docker runner

on: [push]

jobs:
    test:
        name: Run static code analysis
        runs-on: [self-hosted, tests-only]
        container:
            image: ghcr.io/revolutionpi/clang-tidy-analysis:0.3
            credentials:
                username: ${{ github.actor }}
                password: ${{ secrets.CONTAINER_READ }}
        steps:

        # workaround github runner environment pollution
        - name: Clean the workspace
          run: rm -rf $GITHUB_WORKSPACE/*
 
        - uses: actions/checkout@v3
          with:
            submodules: recursive

        - name: Test with clang-tidy
          run: clang-tidy src/*.c src/*.h -- -IpiControl -std=c99

Logs

logs_65.zip

Issue Analytics

  • State:closed
  • Created a year ago
  • Comments:5 (3 by maintainers)

github_iconTop GitHub Comments

1reaction
crazy-maxcommented, Sep 13, 2022

I don’t know. This repository is about the docker login action (see README). Not docker login command by itself.

The ContainerOperationProvider.cs in the log is part of your GitHub Action.

It’s part of the runner application. Suggest to open an issue on https://github.com/actions/runner

0reactions
hjokunbuscommented, Sep 13, 2022

@crazy-max Interesting. What other than “docker login” fails during my actions then? The ContainerOperationProvider.cs in the log is part of your GitHub Action. Or isn’t it? Can you point me to the responsible project, if you think that it has nothing to do with docker login?

Read more comments on GitHub >

github_iconTop Results From Across the Web

Self-hosted runner with Docker step creates files that trip up ...
Describe the bug When using self-hosted runners, git checkouts are cached between runs (this is nice, because it greatly speeds up our ...
Read more >
Issue #105 · myoung34/docker-github-actions-runner
I get the following error, any ideas? worker_1 | Http response code: NotFound from 'POST https://api.github.com/actions/runner-registration' ...
Read more >
myoung34/docker-github-actions-runner: This will run the new ...
This will run the new self-hosted github actions runners with ... github actions itself does not support using docker from a self hosted...
Read more >
Docker Login failed with exit code 1 running jobs in container ...
I am running a job in a container using self-hosted runners and ... The fix for us was to use https://github.com/docker/login-action which ...
Read more >
About self-hosted runners - GitHub Docs
Your runner machine connects to GitHub using the GitHub Actions self-hosted runner application. The GitHub Actions runner application is open source.
Read more >

github_iconTop Related Medium Post

No results found

github_iconTop Related StackOverflow Question

No results found

github_iconTroubleshoot Live Code

Lightrun enables developers to add logs, metrics and snapshots to live code - no restarts or redeploys required.
Start Free

github_iconTop Related Reddit Thread

No results found

github_iconTop Related Hackernoon Post

No results found

github_iconTop Related Tweet

No results found

github_iconTop Related Dev.to Post

No results found

github_iconTop Related Hashnode Post

No results found