Blockstream / electrs

An efficient re-implementation of Electrum Server in Rust
MIT License
314 stars 129 forks source link

Error upon cargo run or cargo update #107

Closed justinriema closed 1 month ago

justinriema commented 1 month ago

Hello Blockstream team! I ran into an error when executing cargo run or cargo update. Please give me a help, thanks very much!

Env: cargo 1.68.2

My steps:

$ git clone https://github.com/blockstream/electrs && cd electrs
$ git checkout new-index
$ cargo run --release --bin electrs -- -vvvv --daemon-dir ~/.bitcoin

Corresponding output:

Updating git repository `https://github.com/Blockstream/rust-electrum-client`
warning: spurious network error (2 tries remaining): unsupported URL protocol; class=Net (12)
warning: spurious network error (1 tries remaining): unsupported URL protocol; class=Net (12)
error: failed to load source for dependency `electrum-client`

Caused by:
  Unable to update https://github.com/Blockstream/rust-electrum-client?rev=d3792352992a539afffbe11501d1aff9fd5b919d

Caused by:
  failed to clone into: /home/work/.cargo/git/db/rust-electrum-client-f542cf701f00f7c1

Caused by:
  network failure seems to have happened
  if a proxy or similar is necessary `net.git-fetch-with-cli` may help here
  https://doc.rust-lang.org/cargo/reference/config.html#netgit-fetch-with-cli

Caused by:
  unsupported URL protocol; class=Net (12)
justinriema commented 1 month ago

Solved. Caused by following lines in ~/.gitconfig

[url "git@github.com:"]
    insteadOf = https://github.com/