rust-lang / rust-lang/cargo

Cargo can't find git credentials for private repo anymore

Open
#3,487 28 comments 8 reactions 0 assignees View on GitHub

Nobody has claimed this yet.

A-git C-bug O-windows S-triage
Dominant language
Rust
Stars
15.5k
Forks
3k
Avg merge
23h 30m
Merged PRs (30d)
51

Description

I was using private repos in my Cargo.toml before without problems.
My git installation is GitHub Desktop for windows.
But now I get this error when doing cargo build on a project that uses a private repo:

  failed to authenticate when downloading repository
attempted to find username/password via git's `credential.helper` support, but failed

Caused by:
  [7/-1] Config value 'credential.helper' was not found

Even though ssh-agent.exe is running, and when I git clone the repo manually on the cmd line, it doesn't ask me for credentials, so the underlying mechanism is working.

(It's been several months since I last tried to build this project but I didn't change anything in it from when it last compiled successfully, only updated rust/cargo (and GitHub updated itself).)

cargo 0.16.0-nightly (3568be9 2016-11-26)

Contributor guide

Open the contributing guide

First steps

  1. Read the whole issue, then the project's contributing guide.
  2. Comment on the issue to say you are picking it up — it saves two people doing the same work.
  3. Fork the repository and make your change on a branch.
  4. Open a pull request that references the issue number.

Research direction

Start by reproducing the cargo build with a private git dependency and inspect how Cargo looks up Git's credential.helper on Windows. Compare that path with the successful command-line git clone and determine why Cargo no longer authenticates. Done means cargo build can download the private repository without requiring a separate credential configuration.

Written by the indexing model from the issue text.

Assessment

Tech stack
git, rust
Domain
authentication, tooling
Issue type
Bug
Difficulty
4/5
Estimated time
3-5 days
Activity status
Stale
Clarity
Mostly clear
Newbie friendliness
30/100

Get new issues in your inbox

A short digest of beginner-friendly GitHub issues.