cannot publish workspace to custom registry sometimes
First I did cargo workspace version to bump the version of all packages.
then cargo workspace publish fails with:
Current HEAD is already released, skipping versioning
error: config value `http.cainfo` is not set
info success ok
Also tried with --publish-as-is but that does not work with private registries:
cargo workspaces publish --registry private-registry --publish-as-is
error: config value `http.cainfo` is not set
error: crates index error: status code '401 Unauthorized': the request was not authorized
regular cargo publish works with tat registry. I'm authenticated and should be good to go.
Using --publish-as-is is correct. It looks like your registry configuration is not set correctly. Were you able to fix this?
no, i was not able to fix it yet.
I just use regular cargo publish.
That being said, I'd rather use cargo workspace.
Iis the registry configuration used by cargo workspace different then the one used by cargo publish? If so, how? Because cargo publish works on the same machine.
Hmm.. it should not be any different. Can you provide me some logs please? Use the -v option.
Hello @pksunkara I just encountered this as well. Had to debug for a few hours. I had to just do manual separate publish and they did work i.e. cargo publish -p <member1>; cargo publish -p <member2>;...
@maulberto3 Would appreciate any links to code (if public) or logs or even error messages.
@maulberto3 Do you also use a custom registry?
Hi,
I can confirm that publishing to a custom registry doesn't work. Here you have an example output in a very simple workspace with a single package.
My custom registry is from https://shipyard.rs/. I'm pretty sure cargo is correctly configured to use it, since I can publish crates without a problem (even multiple ones at once with cargo +nightly -p ... -p ...).
Please let me know what kind of info I can give you to help diagnose the issue. I cannot share this codebase since it's from work, but I assume that any crate would work. In Shipyard, you can create a free account with space for 5 crates, or I guess I can give you publish access to a test crate in our account.