Problem
When depending on custom registries over Git, the consumer is currently expected to also have a reference to the same registry in their .cargo/config.toml.
Steps
- crate-a containing:
$ cat Cargo.toml
[package]
name = "crate-a"
version = "0.1.0"
edition = "2021"
[dependencies]
some-crate = { version = "0.1", registry = "some-registry" }
$ cat .cargo/config.toml
[registries]
some-registry = { index = "ssh://registry.x.com/path/to/some-registry" }
- crate-b containing:
$ cat Cargo.toml
[package]
name = "crate-b"
version = "0.1.0"
edition = "2021"
[dependencies]
crate-a = { version = "0.1", git = "https://git.x.com/path/to/crate-a" }
$ cat .cargo/config.toml
cat: .cargo/config.toml: No such file or directory
- Compiling
crate-b gives the cryptic error:
error: no matching package named `crate-a` found
location searched: https://git.x.com/path/to/crate-a
- Which can be fixed by adding
[registries]
some-registry = { index = "ssh://registry.x.com/path/to/some-registry" }
to crate-b's .cargo/config.toml
Possible Solution(s)
Potentially a flag that can be set in the dependent's .cargo/config.toml to allow git dependencies to use arbitrary registries?
Notes
No response
Version
No response
Problem
When depending on custom registries over Git, the consumer is currently expected to also have a reference to the same registry in their
.cargo/config.toml.Steps
crate-bgives the cryptic error:Possible Solution(s)
Potentially a flag that can be set in the dependent's
.cargo/config.tomlto allow git dependencies to use arbitrary registries?Notes
No response
Version
No response