Skip to content

cargo build fails with git dependency in rust 1.44 #8352

Closed

Description

Problem
Since Rust 1.44, cloning git dependencies fails the first time with an error like the following:

$ cargo build
    Updating git repository `ssh://git@internal-server/path/to/git-repo.git`
error: failed to get `internal-lib-name` as a dependency of package `internal_project v0.1.0 (/Users/jbrown/work/easypost/internal-project)`

Caused by:
  failed to load source for dependency `internal-lib-name`

Caused by:
  Unable to update ssh://git@internal-server/path/to/git-repo.git?tag=v0.1.0#f582cac3

Caused by:
  failed to clone into: /Users/jbrown/.cargo/git/db/internal-lib-name-835eff812df18c1c

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

Caused by:
  failed to map '1'; class=Config (7)

Rerunning cargo build a second time always succeeds.

This worked fine in 1.43.

Steps

  1. Attempt to build a repo with a git dependency

Possible Solution(s)
Working on trying to make a minimal reproducer; figured I'd file this first.

Notes

Output of cargo version: cargo 1.44.0 (05d080faa 2020-05-06) (repros on macOS and Linux)

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Metadata

Assignees

No one assigned

    Labels

    A-gitArea: anything dealing with gitC-bugCategory: bugS-blocked-externalStatus: ❌ blocked on something out of the direct control of the Cargo project, e.g., upstream fix

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions