Skip to content

Git doesn’t ask for SSH key password with net.git-fetch-with-cli = true under Windows #10925

Closed
@pwnorbitals

Description

@pwnorbitals

Problem

I’m using private repositories like this : crate = { git = "ssh://[email protected]/namespace/crate.git" }

In order to allow for SSH authentication, I’m turning on the feature net.git-fetch-with-cli = true through .cargo/config.toml.

It all works fine under Linux (WSL2) and asks for the private key’s password through stdin, but not under Windows.

Steps

  1. Use Windows 10
  2. Use a private repository like shown in problem description
  3. Use a password-protected SSH key
  4. Activate net.git-fetch-with-cli
  5. cargo build fails

Possible Solution(s)

Might be in src/cargo/sources/git/utils.rs:880 or further down in cargo-util/src/process_builder.rs:284

Notes

Today is the first day of the rest of your life

Version

cargo 1.64.0-nightly (85b500cca 2022-07-24)
release: 1.64.0-nightly
commit-hash: 85b500ccad8cd0b63995fd94a03ddd4b83f7905b
commit-date: 2022-07-24
host: x86_64-pc-windows-gnu
libgit2: 1.4.2 (sys:0.14.2 vendored)
libcurl: 7.83.1-DEV (sys:0.4.55+curl-7.83.1 vendored ssl:Schannel)
os: Windows 10.0.19044 (Windows 10 Pro) [64-bit]

Metadata

Metadata

Assignees

No one assigned

    Labels

    A-gitArea: anything dealing with gitC-bugCategory: bugO-windowsOS: Windows

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions