blue-build / website

Website that hosts BlueBuild documentation.
https://blue-build.org/
Apache License 2.0
6 stars 4 forks source link

fix: document github making images private by default #40

Closed marinmo closed 3 months ago

marinmo commented 4 months ago

Hello,

I created a new repository going through the wizard. Once done, I tried to pull my package. This failed as such;

sudo rpm-ostree rebase ostree-unverified-registry:ghcr.io/marinmo/bb-satellite:latest
Pulling manifest: ostree-unverified-registry:ghcr.io/marinmo/bb-satellite:latest
error: Creating importer: Failed to invoke skopeo proxy method OpenImage: remote error: unable to retrieve auth token: invalid username/password: unauthorized

After some troubleshooting, I realised the package created is marked as private. This means one has to add their github credentials to podman before pulling the resulting container image. This was not so with startingpoint when creating a repo via podman. Is setting packages as private intended behaviour? If so, I really think it should be made clearer in the documentation.

To make sure I didn't do a whoopsie, here's a test repo I made to reproduce the issue. I made no changes what so ever to this repo since creating it. Pulling the image also fails, if you want to try; sudo rpm-ostree rebase ostree-unverified-registry:ghcr.io/marinmo/test-image:latest

Manual solution is to set visibility for the package to public (click the package -> Package settings -> scroll down to "Danger Zone" and set visibility to public) but I can't help but to think there ought to be a better way which I'm not aware of. :)

Thanks in advance for your consideration!

xynydev commented 4 months ago

Hmm, I wonder if this is a change on GitHub's side. The wizard does not do changes to the package visibility currently.

Need to test with manual repo creation to see if the issue persists.

xynydev commented 4 months ago

This seems to be an issue on GitHubs side. This issue should be briefly mentioned in our documentation, though,

https://github.com/orgs/community/discussions/110670

marinmo commented 4 months ago

Thank you for the follow up. Yeah, might be good to add a small note somewhere in the documentation. My suggestion would be in the how-to, perhaps add a step 9 instead of the current one (so moving the current one to 10). Want me to do a PR on this?

xynydev commented 4 months ago

You can PR if you want to do it, or want this done quicker.

xynydev commented 3 months ago

Steps to fix:

  1. Open package tab on GH
  2. Select your image
  3. Open package settings
  4. Set package visibility to public

This should be added to the troubleshooting page and mentioned on the repo creation page. Possibilities of automating this in the action should also be investigated.

xynydev commented 3 months ago

0e7b75e

xynydev commented 3 months ago

https://blue-build.org/learn/troubleshooting/#error-creating-importer-failed-to-invoke-skopeo-proxy-method-openimage-remote-error-unable-to-retrieve-auth-token-invalid-usernamepassword-unauthorized