cargo-generate: Error: ⛔ Git Error: invalid version 0 on git_proxy_options; class=Invalid (3)
Not working after updating to 0.10.0 version.
cargo 1.55.0 (32da73ab1 2021-08-23)
cargo-generate 0.10.0
git version 2.33.0
About this issue
- Original URL
- State: closed
- Created 3 years ago
- Comments: 33 (19 by maintainers)
Commits related to this issue
- revert_to_git2_0.13.21_to_avoid_issues This change is related to #461 and #455. Both issues seem to be caused by the use of the newer `libgit2-sys` version. An issue has been created for `git2` team... — committed to taurr/cargo-generate by taurr 3 years ago
- revert_to_git2_0.13.21_to_avoid_issues This change is related to #461 and #455. Both issues seem to be caused by the use of the newer `libgit2-sys` version. An issue has been created for `git2` team... — committed to cargo-generate/cargo-generate by taurr 3 years ago
- revert_to_git2_0.13.21_to_avoid_issues This change is related to #461 and #455. Both issues seem to be caused by the use of the newer `libgit2-sys` version. An issue has been created for `git2` team... — committed to cargo-generate/cargo-generate by taurr 3 years ago
- fix(git+libgit2:versions): try to fix deps issue - as described in #461 the version pinning does not work as expected - so we not pin the minor version at all and let the `cargo` at install time do t... — committed to cargo-generate/cargo-generate by sassman 3 years ago
- fix(git+libgit2:versions): try to fix deps issue - as described in #461 the version pinning does not work as expected - so we not pin the minor version at all and let the `cargo` at install time do t... — committed to cargo-generate/cargo-generate by sassman 3 years ago
FYI: Just installed cargo-generate today, and ran directly into this issue.
As I tried to write the other day: I finally got it to work, but I don’t know why!
The system installed version somhow inteferred - but after trying out another system installed version (which caused the linker step of
cargo-generate
to fail, why?), I reverted back to my distros default (which is what I started with), and suddenly it worked!I know
libgit2-sys
should be independent of the system installed version, but reality is; it’s not! Somehow, somewhere, they can conflict during development.Kinda hard to do any development then - especially as I want the other fixes
Simply genius - now it no longer works - again
To me, this change stops me from using
cargo-generate
as it basically reverts back to the error.@sassman It worked without an error! Thanks a lot.
So for me
cargo-generate
works, but I went down this path to reproduce the issue:/usr/local/bin/git
@v2.32.0
/usr/bin/git
@v2.30.1 (Apple Git-130)
libgit2-sys
cargo bindings atfind ~/.cargo -name "libgit2" -exec rm -rf {} \;
cargo install cargo-generate
this error occurred:cmake
see this issue sobrew install cmake
cargo-generate
->cargo install cargo-generate
-> same errorlibgit2
->brew install libgit2
cargo-generate
->cargo install cargo-generate
-> WORKS!DOPE! now my system is also broken 😃
So my conclusion is that the brew installed
libgit2
would not fit to the rust binding that cargo installs, that is:Cargo.toml
on the pinned version oflibgit2-sys
tocargo update && cargo install --path .
ldd
)So maybe you can check the cargo-generate linked version of
libgit2
on your system?I’m not even sure it’s a
git2
crate specific issue - seems to be a fairly wellknown issue: https://www.google.com/search?q=invalid version 0 on git_proxy_options%3B class%3DInvalid (3)@TonalidadeHidrica it is unfortunately out of our control as this is something to do with a dependency inside
git2
(notgit
).I discovered this error as I couldn’t run the testcases after the
git2
dependency had been upgraded. Downgrading to out to be really hard, as it is one ofgit2
s dependencies that caused the issue, and once updated, both new and oldgit2
version is quite happy to use the problematic 3’rd dependency. - Convoluted, I know!Even worse, I could only reproduce this on my Manjaro machine - the error was not present on Windows, nor Ubuntu nor Debian. Some user had the issue also on Arch Linux.
Just for clarification, could we get your exact OS version etc? I’d still like to see if we could somehow replicate this as I think a lot of ppl even outside
cargo-generate
would like to know the culpritt.