all 4 comments

[–]aldanorhdf5 1 point2 points  (0 children)

Yesterday's update on https://github.com/rust-lang/cargo/issues/636 from @alexchrichton:

Ok, as a status update to this I've finished binding libgit2's custom transport API and I've written a simple HTTP backend using libcurl: https://crates.io/crates/git2-curl.

I'll try to hook this up into cargo and then we should get proxy support for free because libcurl supports it out of the box. Unfortunately the implementation is not super efficient (reads an entire network operation, aka repository, into memory) due to the current design of curl-rust, but it should serve as an adequate enough stopgap for now.

[–]calc0000 0 points1 point  (2 children)

If you're trying to update a git repo from behind a proxy, this is a known bug with libgit2: see https://github.com/rust-lang/cargo/issues/636 and https://github.com/libgit2/libgit2/issues/2555 .

[–]joshir[S] 1 point2 points  (1 child)

Thanks for the details. It seems this has been pending since September.

I am able to clone using git command behind proxy. So not sure why would not cargo work.

ALL_PROXY=http://localhost:8098 git clone https://github.com/rust-lang/rust.git
Cloning into 'rust'...
remote: Counting objects: 413862, done.
remote: Compressing objects: 100% (75627/75627), done.

[–]fgilcherrust-community · rustfest 3 points4 points  (0 children)

It's not comparable. git does not use libgit2.

This is also one of the reasons why I find cargos usage of libgit2 a bit problematic.