-
Notifications
You must be signed in to change notification settings - Fork 52
Description
When I try to publish with sparse registries, I get:
error: crates index error: Protocol Ext("sparse+https") of url "sparse+https://$MY_REGISTRY" is denied per configuration
If I github code search for this, I find this error has come from gitoxide, https://github.com/search?q=%22is+denied+per+configuration%22&type=code, which is the library Cargo uses to talk to git repositories.
This makes me believe that cargo-workspace-publish is trying to publish using a non-sparse URL.
Looking at https://github.com/pksunkara/cargo-workspaces/blob/master/cargo-workspaces/src/publish.rs#L112, it looks like registry+
is prepended to every url, meaning that with my sparse registry, the url being passed to the is_published check happening in the publish is registry+sparse+https://$MY_REGISTRY
which is invalid and so passed through as a git check.
I think that blanket prepending registry+ is an incorrect algorithm. My suspicion is that this check should be skipped as for larger registries it would tend to take an unnecessarily large amount of time.