killercup / cargo-edit

A utility for managing cargo dependencies from the command line.
http://killercup.github.io/cargo-edit/
MIT License
3.01k stars 144 forks source link

Support socks5 #546

Open oovm opened 2 years ago

oovm commented 2 years ago

Failed to run upgrade after install cargo-edit under socks5.

PS D:\Rust\> cargo upgrade
    Updating 'https://github.com/rust-lang/crates.io-index' index
Command failed due to unhandled error: invalid URL: 'socks5://127.0.0.1:7891'; class=Http (34)
cg31 commented 2 years ago

It seems this is an error from libgit2, which is used by git2-rs.

I wonder if cargo-edit could use an option "git-fetch-with-cli=true" like cargo to fix it.

cg31 commented 2 years ago

I tried using git-cli to update registry index, it indeed fixed the issue: https://github.com/cg31/cargo-edit/commit/42e025e066dbbda820d800500c359d2218e1abbe

oovm commented 1 year ago

Still exists in latest version.

I use update + offline hack now.

cargo update && cargo upgrade --offline