how to

attempted-ssh-agent-authentication

Mar 4, 2024
langsrustcargoinstall
1 Minutes
85 Words
1
✗ cargo build
2
Updating crates.io index
3
error: failed to get `async-std` as a dependency of package `app-name v0.1.0 (/Users/sathia/Developer/rust-codebase/app-name)`
4
Caused by:
5
failed to load source for dependency `async-std`
6
Caused by:
7
Unable to update registry `https://github.com/rust-lang/crates.io-index`
8
Caused by:
9
failed to fetch `https://github.com/rust-lang/crates.io-index`
10
Caused by:
11
failed to authenticate when downloading repository: [email protected]:rust-lang/crates.io-index
12
* attempted ssh-agent authentication, but no usernames succeeded: `git`
13
if the git CLI succeeds then `net.git-fetch-with-cli` may help here
14
https://doc.rust-lang.org/cargo/reference/config.html#netgit-fetch-with-cli
15
Caused by:
1 collapsed line
16
no authentication available

Sol

ref: https://stackoverflow.com/questions/62640383/how-to-make-gitconfigs-insteadof-work-with-cargo

For bash, export CARGO_NET_GIT_FETCH_WITH_CLI=true.

For fish , set -gx CARGO_NET_GIT_FETCH_WITH_CLI true.

Article title:attempted-ssh-agent-authentication
Article author:Julyfun
Release time:Mar 4, 2024
Copyright 2025
Sitemap