VA-49: prepend Bearer to cargo registry token to fix 401 on publish #50
Loading…
Reference in a new issue
No description provided.
Delete branch "fix/VA-49-cargo-bearer-token"
Deleting a branch is permanent. Although the deleted branch may continue to exist for a short time before it actually gets removed, it CANNOT be undone in most cases. Continue?
What
Prepends the literal
Bearerprefix to the cargo registry token env inpublish-crates.yml.Why
cargo sends the
CARGO_REGISTRIES_*_TOKENvalue verbatim as theAuthorizationheader. The Forgejo Cargo registry rejects a bare PAT with HTTP 401 (authGroup.Verify) and requiresAuthorization: Bearer <pat>. Per the Forgejo docs: "prepend the string 'Bearer ' to your API token" (https://forgejo.org/docs/latest/user/packages/cargo/).Publish runs #163 and #164 reached the upload step cleanly. resolve, package, and the verify build of
vervain-agent-mcp v0.1.0all passed; the run failed only atUploadingwith 401. This prefix is the fix.Scope
The Actions secret
PSA_SYSTEMS_PRIVATE_PACKAGE_PATstays the raw PAT, sobuild-package.yml's Generic Packages upload (different auth scheme) is unaffected. TheBearerprefix lives only in the cargo step's env.Verification plan after merge
Dispatch
fj actions dispatch publish-crates.yml main -I ref=v0.1.0, then confirm the sparse index returns 0.1.0 for both crates and the registry lists them.#VA-49