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

Anonymous pull from ghcr.io #41

Closed
termoshtt opened this issue Jul 14, 2022 · 3 comments · Fixed by #74
Closed

Anonymous pull from ghcr.io #41

termoshtt opened this issue Jul 14, 2022 · 3 comments · Fixed by #74
Assignees
Labels
bug Fix bug.

Comments

@termoshtt
Copy link
Owner

termoshtt commented Jul 14, 2022

Build of examples/rust-exe fails:

Caused by:
  process didn't exit successfully: `/home/user/github.com/termoshtt/ocipkg/examples/rust-exe/target/debug/build/ocipkg-exe-example-8b1f8b360a9de191/build-script-build` (exit status: 101)
  --- stderr
  thread 'main' panicked at 'Failed to get image: RegistryError(ErrorResponse { errors: [ErrorInfo { code: Unauthorized, message: Some("authentication required"), detail: None }] })', /home/user/github.com/termoshtt/ocipkg/src/lib.rs:29:18
  note: run with `RUST_BACKTRACE=1` environment variable to display a backtrace

This will be resolved by #18, but it should be able to pull the container anonymously.

@termoshtt termoshtt added the bug label Jul 14, 2022
@termoshtt termoshtt added this to the 0.1.0 milestone Jul 14, 2022
@termoshtt termoshtt self-assigned this Jul 14, 2022
@termoshtt termoshtt changed the title Cannot get image from ghcr.io Cannot get image from ghcr.io with authorization error Jul 14, 2022
@termoshtt
Copy link
Owner Author

ghcr.io returns www-authebticate header, which requests to client(ocipkg) to get token based on OAuth protocol.

@termoshtt termoshtt changed the title Cannot get image from ghcr.io with authorization error Anonymous pull from ghcr.io Jul 15, 2022
@termoshtt termoshtt removed the bug label Jul 15, 2022
@termoshtt termoshtt removed this from the 0.1.0 milestone Jul 15, 2022
@termoshtt
Copy link
Owner Author

Authentication issue will be tackled in #18. This issue focuses on anonymous pull

@termoshtt termoshtt removed their assignment Jul 15, 2022
@termoshtt termoshtt self-assigned this Sep 9, 2022
@termoshtt
Copy link
Owner Author

Token for pulling ghcr.io/termoshtt/ocipkg/dynamic/rust:6f9b7aa image can be obtained by following:

curl -sfL "https://ghcr.io/token?service=ghcr.io&scope=repository:termoshtt/ocipkg/dynamic/rust:pull"

Current (0.2.5) implementation does not set scope correctly.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
bug Fix bug.
Projects
None yet
Development

Successfully merging a pull request may close this issue.

1 participant