Skip to content

Support for private registries #172

@t-moe

Description

@t-moe

Hi @goulvenclech ,

I wanted to ask whether you plan to add support for private registries in the mid- or long-term?
Currently the check whether a crate is already published seems to be hardcoded to crates.io.

fn version_exists_on_crates_io(crate_name: &str, version: &str) -> Result<bool> {
// Query crates.io: https://crates.io/api/v1/crates/<name>/<version>
let url = format!("https://crates.io/api/v1/crates/{}/{}", crate_name, version);

(In theory, one can use cargo_utils to resolve registry urls + authentication tokens. as I did here: crate-ci/cargo-release#927. AFAIK cargo-edit also has the ability to resolve registry URLs, but not tokens. However, to solve it properly (with credential providers etc), we would probably have to duplicate a lot of code from cargo.)

Note: We're still not using sampo actively (instead still evaluating, stuck with other work), so no need to get active right now.

Also, I recall you mentioned me to try a new feature recently. but i cant find the comment anymore..? Would you be kind enough to send it to me again? Thank you

Metadata

Metadata

Assignees

No one assigned

    Labels

    P3 - normalNew features, bugs with workarounds, bugs affecting very specific usage...crt:sampo-coreChanges in Sampo core logic or internal utils.

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions