davidB / git2_credentials

Provide credentials function to used with git2::RemoteCallbacks.credentials
Apache License 2.0
21 stars 4 forks source link

0.7.1 does not build #23

Closed kondziu closed 3 years ago

kondziu commented 3 years ago

Hello,

The version of git2_credentials on crates.io does not build.

I created a new projects:

cargo init butts

I edited Cargo.toml to add a dependency to git2_credentials:

[package]
name = "butts"
version = "0.1.0"
authors = ["Konrad Siek <konrad.siek@gmail.com>"]
edition = "2018"

# See more keys and their definitions at https://doc.rust-lang.org/cargo/reference/manifest.html

[dependencies]
git2_credentials = "0.7.1"

I then tried to build with cargo build --release which yields the following error:

kondziu@yuzu:~/Workspace/butts$ cargo build --release
    Updating crates.io index
error: failed to select a version for the requirement `zeroize = "^0.9.3"`
candidate versions found which didn't match: 1.3.0, 1.2.0, 1.1.1, ...
location searched: crates.io index
required by package `dialoguer v0.7.0`
    ... which is depended on by `git2_credentials v0.7.1`
    ... which is depended on by `butts v0.1.0 (/home/kondziu/Workspace/butts)`
kondziu commented 3 years ago

From what I understand, git2_credentials depends on dialoguer 0.7, which depends on zeroize version 0.9.3 or higher, (but without going over to the next major release). Zeroize <1.0.0 was removed from crates.io. While this should not have prevented dialoguer from downloading the old version anyway, it fails to do so. I guess this is a cargo bug.

Workarounds are to import the github version of git2_credentials

git2_credentials = { git = "https://github.com/davidB/git2_credentials.git" }

Alternatively, dialoguer dependency can be turned off via features

git2_credentials = { version = "0.7.1" , default-features = false }
davidB commented 3 years ago

Thanks for the reports, version 0.7.2 published on crates.io