crates.io-proxy is a crates.io proxy which temporarily fixes a cargo issue Cargo doesn't respect git's http.sslverify
Set up crates.io proxy:
cd /PATH/TO/DEV/DIR
git clone https://github.com/chrisxue815/crates.io-proxy.git
cd crates.io-proxy
npm config set strict-ssl false
npm install
node index.js --port 3000 --proxy PROXY_ADDRESS
- Open
http://127.0.0.1:3000/api/v1/crates/libc/0.2.6/download
in your browser to make sure the proxy is working
Set up index repo:
-
cd /PATH/TO/DEV/DIR
-
git clone https://github.com/rust-lang/crates.io-index.git
-
Open
./crates.io-index/config.json
, setdl
to"http://HOSTNAME:3000/api/v1/crates"
-
cd crates.io-index
-
git add .
-
git commit -m fixup!
-
Create or open
~/.cargo/config
, add/set the following section[registry] index = "file:///PATH/TO/DEV/DIR/crates.io-index"
cargo build
should work now. If not, try deleting or renaming ~/.cargo/registry
and PROJECT_DIR/target