`DENIED: permission_denied: read_package` when pulling from GHCR despite public repo
Unable to pull ghcr.io/rightnow-ai/openfang:latest even after successful authentication. The GHCR package appears to be misconfigured as private despite the repository being public.
Steps to reproduce:
# 1. Login (succeeds)
echo $CR_PAT | podman login ghcr.io -u <username> --password-stdin
# → Login Succeeded!
# 2. Pull (fails)
podman pull ghcr.io/rightnow-ai/openfang:latest
# → Error: initializing source docker://ghcr.io/rightnow-ai/openfang:latest: reading manifest latest in ghcr.io/rightnow-ai/openfang: denied
docker pull ghcr.io/rightnow-ai/openfang:latest
# → Error response from daemon: error from registry: unauthorized
# → unauthorized
# 3. Confirmed via scoped token exchange
B64=$(echo -n "<username>:$CR_PAT" | base64 -w0)
TOKEN=$(curl -s \
-H "Authorization: Basic $B64" \
"https://ghcr.io/token?service=ghcr.io&scope=repository:rightnow-ai/openfang:pull" \
| python3 -c "import sys,json; print(json.load(sys.stdin)['token'])")
curl -H "Authorization: Bearer $TOKEN" \
https://ghcr.io/v2/rightnow-ai/openfang/tags/list
# → {"errors":[{"code":"DENIED","message":"permission_denied: read_package"}]}
Expected behavior:
Any authenticated GitHub user should be able to pull the image, given this is a public repository.
Actual behavior:
GHCR returns permission_denied: read_package at the package level, even with a valid PAT containing read:packages scope and a successful registry login. The scoped token exchange confirms the denial is enforced by GHCR's package-level ACL, not by the token or credentials.
Root cause (suspected):
The linked GHCR package (ghcr.io/rightnow-ai/openfang) is likely set to private or internal visibility in GitHub Package Settings, independent of the repository's public visibility. These are separate settings on GitHub and must be explicitly set to public.
Fix:
In the repository's GitHub Package Settings, navigate to Package Settings → Change visibility and set it to Public, or ensure the package inherits the repository's public visibility.
Environment:
- Podman (Ubuntu)
- GitHub Container Registry (
ghcr.io) - PAT scope:
read:packages
This is a GitHub Package Settings issue, not a code bug. The GHCR package visibility is set separately from the repo visibility.
We need to go to GitHub > Packages > openfang > Package Settings > Change visibility > Public. Will fix this shortly.
In the meantime you can build from source or use the release binary from the GitHub Releases page.
Maybe we should hide it in the docs for now, as only the repo owner seems to have access it. This way we avoid the added friction for newcomers until this gets fixed, no?
The GHCR package visibility needs to be set to public in GitHub's Package Settings UI (repo settings alone aren't enough).
In the meantime, you can build from source with Docker:
```bash git clone https://github.com/RightNow-AI/openfang.git cd openfang docker compose up --build ```
We've updated `docker-compose.yml` to document this. Will update here once GHCR visibility is fixed.
Hi team 👋
Ran into this same issue. The GHCR package visibility is configured separately from the repository — it needs to be manually set to Public under Package Settings → Change visibility.
Suggestion: add --visibility public to the container publish step in CI to prevent recurrence on future releases. Happy to submit a PR for the CI workflow fix if helpful!
bro its a simple setting toggle. you ship so many updates and just cant toggle a BUTTON??
GHCR permissions are a GitHub Container Registry configuration issue, not an OpenFang code issue. The recommended installation method is the install script or building from source.
@jaberjaber23 if the recommended installation method is to not pull from an already-compiled Docker image, then I think the documentation at https://www.openfang.sh/docs/getting-started should be updated to direct users to do that. I just learned of this project and was trying to follow that guide and ran into this issue.
Alternatively, I agree with @manalkaff that this should be a simple configuration setting for you as the project maintainer to go into the Container Registry settings and change it. Is there a reason you want the built image to remain private?
TBF @jaberjaber23 this takes way too long and reduces productivity. A pre-built image would be hugely appreciated by the majority of the community.
I think @jaberjaber23 was pointing at the right root cause.
This doesn’t look like a build failure — it looks like the image is being published, but the GHCR package itself probably isn’t public. GitHub lets package visibility be separate from repo visibility, so a public repo can still have a package that can’t be pulled anonymously. Public container registry packages can be pulled without auth once the package visibility is set correctly. ([GitHub Docs][1])
Since CI is already producing the image, it’d be really helpful to make ghcr.io/rightnow-ai/openfang publicly pullable. That would save everyone from rebuilding locally when the artifact already exists.
If helpful, I’m happy to verify once it’s updated.
following instructions found at https://www.openfang.sh/docs/getting-started
❯ docker pull ghcr.io/RightNow-AI/openfang:latest invalid reference format: repository name (RightNow-AI/openfang) must be lowercase
👍