Skip to content

Failed to fetch advisory database: git operation failed #388

@hanabi1224

Description

@hanabi1224

Describe the bug
cargo works with the combination of below ~/.gitconfig and ~/.cargo/config , but cargo deny check advisories fails with errors.

~/.gitconfig

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

~/.cargo/config

[net]
git-fetch-with-cli = true

Error:

2022-01-19 04:07:41 [ERROR] failed to fetch advisory database: git operation failed: failed to authenticate when downloading repository
attempted ssh-agent authentication, but none of the usernames `git` succeeded

To Reproduce
Steps to reproduce the behavior:

  1. create ~/.gitconfig and ~/.cargo/config with the content above
  2. run setup ssh keys for git cli
  3. run cargo update against any crate, it should work fine
  4. run cargo deny check advisories, it fails with error above

Expected behavior
A clear and concise description of what you expected to happen.

Screenshots
If applicable, add screenshots to help explain your problem.

Device:

  • OS: windows 11 / wsl2 Ubuntu 20.04
  • Browser [e.g. chrome, safari]
  • Version [e.g. 22]

Additional context
Add any other context about the problem here.

Metadata

Metadata

Assignees

No one assigned

    Labels

    enhancementNew feature or request

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions