You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
{{ message }}
Repository navigation
[BUG] apm marketplace add silently fails for private repos #693
Describe the bug apm marketplace add OWNER/REPO always fails silently when the marketplace repo is private. The command reports No marketplace.json found even when the file exists and the user has valid credentials.
To Reproduce
Have a private GitHub repo containing a valid marketplace.json at the root
Ensure you have valid credentials with repo scope (e.g. via gh auth login)
Run apm marketplace add <owner>/<private-repo> --verbose
See error: No marketplace.json found in '<owner>/<private-repo>'
Expected behavior apm marketplace add should successfully register the marketplace using the authenticated user's credentials, and report the number of plugins found.
Environment
OS: macOS
APM Version: 0.8.11
Logs
[*] Registering marketplace 'my-marketplace'...
Repository: owner/private-repo
Branch: main
[x] No marketplace.json found in 'owner/private-repo'. Checked: marketplace.json, .github/plugin/marketplace.json, .claude-plugin/marketplace.json
Additional context
The file is accessible via gh api with the same credentials, confirming it is an authentication issue in the apm CLI rather than a missing file.
Added a ## [Unreleased] → ### Fixed entry for the private-repo authentication fix in apm marketplace add, ending with (#701). Validated with head -30 CHANGELOG.md.
Confirmed this is fixed in PR #701. Tested apm marketplace add against a private GitHub repository containing a valid marketplace.json -- the command now correctly authenticates and registers the marketplace (73 plugins detected).
The root cause was that _fetch_file() used unauth_first=True when calling AuthResolver.try_with_fallback(). For private repos, GitHub returns 404 (not 403) to unauthenticated requests, and the code treated that as "file not found" without ever retrying with credentials. The fix switches to unauth_first=False so credentials are used on the first attempt when available.
Activity
sergio-sisternes-epam commentedon Apr 14, 2026
Starting work on the changelog update for this fix. I’m adding the
CHANGELOG.mdentry under## [Unreleased]for PR #701.sergio-sisternes-epam commentedon Apr 14, 2026
Completed the changelog update in
CHANGELOG.md.Added a
## [Unreleased]→### Fixedentry for the private-repo authentication fix inapm marketplace add, ending with(#701). Validated withhead -30 CHANGELOG.md.sergio-sisternes-epam commentedon Apr 14, 2026
Confirmed this is fixed in PR #701. Tested
apm marketplace addagainst a private GitHub repository containing a validmarketplace.json-- the command now correctly authenticates and registers the marketplace (73 plugins detected).The root cause was that
_fetch_file()usedunauth_first=Truewhen callingAuthResolver.try_with_fallback(). For private repos, GitHub returns 404 (not 403) to unauthenticated requests, and the code treated that as "file not found" without ever retrying with credentials. The fix switches tounauth_first=Falseso credentials are used on the first attempt when available.alleml commentedon Apr 20, 2026
I have the same issue with APM v0.8.12, seems that this fix doesn't resolve original issue