Custom BlueBild Image on private repo

Hi,

I have created custom image in private repo. How to pull and rebase with authentication? I put ‘/etc/ostree/auth.json’ with login and password to Github but access is still “403 forbidden”.

rpm-ostree rebase ostree-unverified-registry:ghcr.io.....path_to_private_repo

Relevant GitHub docs

Solved. Thank you.

Short manaul for others:

  1. Generate private classic token just to read packages
  2. generate base46 from: username:privatetoken
  3. create /etc/ostree/auth.json file
  4. put authentication credentials there:
{
	"auths": {
		"ghcr.io": {
			"auth": "base64generatedcode"
		}
	}
}
  1. Save the file
  2. run the rebase command:
    rpm-ostree rebase ostree-unverified-registry:ghcr.io ..... path_to_private_repo
  3. and do other rebase tasks if needed
2 Likes

Custom Bluebuild image cannot be signed:

rpm-ostree rebase ostree-unverified-registry:ghcr.io...... works
rpm-ostree rebase ostree-image-signed:docker://ghcr.io..... does not.

error:
Creating importer: Failed to invoke skopeo proxy method OpenImage: remote error: Running image docker://ghcr.io/...... is rejected by policy.

I thought I should add another scope on token generation page read:public_key alongside read:packages but it doesn’t help.

What’s the solution?