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

Can't Login ghcr.io for docker registry with Github Enterprise server #1199

Closed
pyama86 opened this issue Jul 12, 2021 · 4 comments · Fixed by #1291
Closed

Can't Login ghcr.io for docker registry with Github Enterprise server #1199

pyama86 opened this issue Jul 12, 2021 · 4 comments · Fixed by #1291
Assignees
Labels
bug Something isn't working

Comments

@pyama86
Copy link

pyama86 commented Jul 12, 2021

Describe the bug
H!
I'm using Github Enterprise Server and GitHub Actions.
I realized message Docker login for 'ghcr.io' failed with exit code 1 and I did a little research on this.
I think you not considered pta token for docker registry token.
https://github.com/actions/runner/blob/main/src/Runner.Worker/ContainerOperationProvider.cs#L506
Seemingly login with Github Enterprise Token but actions should use github.com token.
Can I do any workarounds?

Using version.
GHES: 3.1
runner: v2.278.0

To Reproduce
Steps to reproduce the behavior:

  1. Go to '...'
  2. Run '....'
  3. See error

Expected behavior
A clear and concise description of what you expected to happen.

Runner Version and Platform

Version of your runner?

OS of the machine running the runner? OSX/Windows/Linux/...

What's not working?

Please include error messages and screenshots.

Job Log Output

If applicable, include the relevant part of the job / step log output here. All sensitive information should already be masked out, but please double-check before pasting here.

Runner and Worker's Diagnostic Logs

If applicable, add relevant diagnostic log information. Logs are located in the runner's _diag folder. The runner logs are prefixed with Runner_ and the worker logs are prefixed with Worker_. Each job run correlates to a worker log. All sensitive information should already be masked out, but please double-check before pasting here.

@pyama86 pyama86 added the bug Something isn't working label Jul 12, 2021
@TingluoHuang
Copy link
Member

@pyama86 do you mind sharing a sample workflow YAML file and workflow log?

@pyama86
Copy link
Author

pyama86 commented Jul 15, 2021

@TingluoHuang
I could send log to you, but Isn't it self-evident that GHES users can't have a github.com token?

@hsbt
Copy link

hsbt commented Jul 15, 2021

Hi, I'm colleague with @pyama86 . I did escalate this issue to GHES support team.

@TingluoHuang Can you contact them? Thanks.

@thboop
Copy link
Collaborator

thboop commented Aug 17, 2021

This is a bug, we should not use a GHAE/GHES github token to login to ghcr.io. This makes it fail for public containers because auth fails even though these containers are public.

Its on our radar and we are working on rolling out a fix.

@thboop thboop self-assigned this Aug 17, 2021
alixinne added a commit to alixinne/runner that referenced this issue Jun 10, 2024
When running GitHub Enterprise Server with a pool of JIT-configured runners (such as what [philips-labs/terraform-aws-github-runner](https://github.com/philips-labs/terraform-aws-github-runner/) provides), actions#1199 still occurs. The fix in actions#1291 uses the "IsHostedServer" property from the settings which is **not** set by the GHES endpoint for JIT configuration.

This change computes the default value of IsHostedServer from the GitHub server URL, as is already done in [lots of other parts of the code](https://github.com/search?q=repo%3Aactions%2Frunner%20IsHostedServer&type=code) to make it consistent.
alixinne added a commit to alixinne/runner that referenced this issue Jun 10, 2024
…rver

When running GitHub Enterprise Server with a pool of JIT-configured runners (such as what [philips-labs/terraform-aws-github-runner](https://github.com/philips-labs/terraform-aws-github-runner/) provides), actions#1199 still occurs. The fix in actions#1291 uses the "IsHostedServer" property from the settings which is **not** set by the GHES endpoint for JIT configuration.

This change computes the default value of IsHostedServer from the GitHub server URL, as is already done in [lots of other parts of the code](https://github.com/search?q=repo%3Aactions%2Frunner%20IsHostedServer&type=code) to make it consistent.
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

Successfully merging a pull request may close this issue.

4 participants