Skip to content

fix: switch private-module auth to GH_PAT, fix remaining GHCR casing - #89

Merged
ntlaletsi70 merged 2 commits into
developfrom
fix/private-module-auth-pat
Jul 15, 2026
Merged

fix: switch private-module auth to GH_PAT, fix remaining GHCR casing#89
ntlaletsi70 merged 2 commits into
developfrom
fix/private-module-auth-pat

Conversation

@ntlaletsi70

Copy link
Copy Markdown
Collaborator

Summary

  • SSH_PRIVATE_KEY can never authenticate: no SSH keys are registered on any relevant GitHub account (only GPG keys, which sign commits/tags but don't authenticate git operations). Builds using it fail with git@github.com: Permission denied (publickey).
  • Switched Containerfile (image.yml's build) and ko.yml from SSH-based git auth to GH_PAT-over-HTTPS — the same pattern already working in ci.yaml/gosec.yml/vulnscan.yml/melange.yaml. GH_PAT is passed into the Docker build as a BuildKit secret (--secret id=gh_pat) so it's never written into an image layer.
  • Fixed the remaining ghcr.io/BlanketOps/* (capital-case) IMAGE_REPO references missed by the earlier org-rename PR (fix: match private-module org casing to lowercase blanketops rename #85) — ko.yml's was live-broken:
    Error: error creating publisher: failed to parse "ghcr.io/BlanketOps/blanketops-environments-controller" as repository:
    repository can only contain the characters `abcdefghijklmnopqrstuvwxyz0123456789_-./`: BlanketOps/blanketops-environments-controller
    

Test plan

  • Local docker buildx build --secret id=gh_pat,env=GH_TOKEN -f Containerfile against a real PAT confirmed go mod download resolves the private blanketops/environments, environments-api modules over HTTPS
  • grep -rn "BlanketOps" (capital) across workflows/Containerfile returns no functional hits
  • image.yml/ko.yml CI runs green end-to-end (push-triggered, will confirm on merge)

…epo paths

SSH_PRIVATE_KEY can never authenticate: no SSH keys are registered on
any relevant GitHub account (only GPG keys, which sign commits/tags but
don't authenticate git operations), so builds using it fail with
"Permission denied (publickey)". Switch Containerfile and
image.yml/ko.yml to the same GH_PAT-over-HTTPS pattern already working
in ci.yaml/gosec.yml/vulnscan.yml/melange.yaml. The Containerfile reads
the PAT via a BuildKit secret mount so it never persists in an image
layer.

Also lowercase the remaining ghcr.io/BlanketOps/* IMAGE_REPO references
(ko.yml, vulnscan.yml, apko.yml, release.yml, image.yml comments) missed
in the prior org-casing fix — ko.yml's was live-broken: "repository can
only contain the characters `abcdefghijklmnopqrstuvwxyz0123456789_-./`".
Under the blanketops/ org namespace, "blanketops-environments-controller"
duplicates the org name. Correct GHCR path is
ghcr.io/blanketops/environments-controller, matching how GHCR packages
are conventionally named after the repo. Docker Hub's path
(docker.io/nkanyezisolutions/blanketops-environments-controller) is
untouched — no org-name collision there since it's a personal namespace.
@ntlaletsi70
ntlaletsi70 merged commit f79fa8d into develop Jul 15, 2026
@ntlaletsi70
ntlaletsi70 deleted the fix/private-module-auth-pat branch July 15, 2026 19:28
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant