Do not force creation of _cargo-index repo on publish (#27266) #27765
Add this suggestion to a batch that can be applied as a single commit.
This suggestion is invalid because no changes were made to the code.
Suggestions cannot be applied while the pull request is closed.
Suggestions cannot be applied while viewing a subset of changes.
Only one suggestion per line can be applied in a batch.
Add this suggestion to a batch that can be applied as a single commit.
Applying suggestions on deleted lines is not supported.
You must change the existing code in this line in order to create a valid suggestion.
Outdated suggestions cannot be applied.
This suggestion has been applied or marked resolved.
Suggestions cannot be applied from pending reviews.
Suggestions cannot be applied on multi-line comments.
Suggestions cannot be applied while the pull request is queued to merge.
Suggestion cannot be applied right now. Please check back later.
Backport #27266 by @merlleu
Hello there,
Cargo Index over HTTP is now prefered over git for package updates: we should not force users who do not need the GIT repo to have the repo created/updated on each publish (it can still be created in the packages settings).
The current behavior when publishing is to check if the repo exist and create it on the fly if not, then update it's content.
Cargo HTTP Index does not rely on the repo itself so this will be useless for everyone not using the git protocol for cargo registry.
This PR only disable the creation on the fly of the repo when publishing a crate.
This is linked to #26844 (error 500 when trying to publish a crate if user is missing write access to the repo) because it's now optional.