Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Failure when using source replacement #247

Closed
cyqsimon opened this issue Dec 6, 2023 · 3 comments
Closed

Failure when using source replacement #247

cyqsimon opened this issue Dec 6, 2023 · 3 comments

Comments

@cyqsimon
Copy link

cyqsimon commented Dec 6, 2023

When a source replacement is specified for crates.io in ~/.cargo/config.toml, updating using cargo install-update -a will fail:

Updating PKG
error: registry index was not found in any configuration: `SOURCE`

Steps to reproduce

  1. Append the following to ~/.cargo/config.toml:
[source.my-replacement-source]
registry = "https://github.com/jhnc-oss/crates.io-index.git"
[source.crates-io]
replace-with = "my-replacement-source"

You can use any valid registry; I just picked the most recent GitHub fork of https://github.com/rust-lang/crates.io-index.

  1. Run cargo install [email protected] to verify the registry setting. Again, you can use any valid binary crate.
  2. Run cargo install-update -l to verify that fd-find has an update.
  3. Run cargo install-update -a and observe the failure.
  4. Don't forget to reset ~/.cargo/config.toml after testing.
@nabijaczleweli
Copy link
Owner

Dupe of #185, documented in https://github.com/nabijaczleweli/cargo-update#source-replacement-vs-custom-registries – you need an index key with the same value as registry, this was broken by cargo 2019-09-10.

@nabijaczleweli
Copy link
Owner

nabijaczleweli commented Dec 6, 2023

closing? nope, didn't work. github just doesn't work at all anymore

@cyqsimon
Copy link
Author

cyqsimon commented Dec 7, 2023

Ah okay sorry my bad. Didn't read properly.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

2 participants