1
0

Delete article

Deleted articles cannot be recovered.

Draft of this article would be also deleted.

Are you sure you want to delete this article?

More than 3 years have passed since last update.

Resolve authentication error for ssh:// in Cargo project

Last updated at Posted at 2020-04-09

In some crates, dependencies may be use ssh protocols, cargo build may lead some error like this:


Caused by:
  failed to authenticate when downloading repository
attempted ssh-agent authentication, but none of the usernames `git` succeeded

Caused by:
  error authenticating: no auth sock variable; class=Ssh (23)

How to fix?

Some advices here like this:

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

But not worked for me, I used this resolution:


eval `ssh-agent -s`
ssh-add
cargo ...
1
0
0

Register as a new user and use Qiita more conveniently

  1. You get articles that match your needs
  2. You can efficiently read back useful information
  3. You can use dark theme
What you can do with signing up
1
0

Delete article

Deleted articles cannot be recovered.

Draft of this article would be also deleted.

Are you sure you want to delete this article?