I have the following in my ~/.gitconfig:
[url "[email protected]:"]
       pushInsteadOf = https://github.com/
       insteadOf = https://github.com/
Unfortunately today I discovered that this prevents me from making cargo build download dependencies for me:
    Updating crates.io index
error: failed to get `libc` as a dependency of package `hilbert-c2rust v0.1.4 (/home/d33tah/workspace/profound/hilbert-c2rust)`
Caused by:
  failed to load source for dependency `libc`
Caused by:
  Unable to update registry `https://github.com/rust-lang/crates.io-index`
Caused by:
  failed to fetch `https://github.com/rust-lang/crates.io-index`
Caused by:
  failed to authenticate when downloading repository
attempted ssh-agent authentication, but none of the usernames `git` succeeded
Caused by:
  no authentication available
Is there a workaround for this problem? Commenting out the lines temporarily helps, but I'd like to keep them because they solve a problem related to Github for me.
Set env var CARGO_NET_GIT_FETCH_WITH_CLI to true.
Try this (from here):
[url "ssh://[email protected]/"]
    insteadOf = https://github.com
[url "https://github.com/rust-lang/crates.io-index"]
    insteadOf = https://github.com/rust-lang/crates.io-index
If you love us? You can donate to us via Paypal or buy me a coffee so we can maintain and grow! Thank you!
Donate Us With