Skip to content

default username used for git clones over ssh is not generally correct #2399

@eminence

Description

@eminence

This might be a duplicate of #1851 or #2078 but I can't quite tell. My understanding is that cargo is supposed to use ssh-agent for authentication, but I can't get this to work.

I have a dependency with a git-over-ssh path:

[dependencies.sma_utils]
git = "ssh://gitsrvsim/usr/abaqus60/GITrepo/sma_rust.git"

SSH to this machine is password-less (due to ssh-agent, and not due a .ssh/config file):

$ ssh -o BatchMode=yes gitsrvsim hostname
Permission denied (publickey,gssapi-with-mic,password).
$ ssh-add ~/.ssh/sim_internal
Identity added: /u/users/lxd/.ssh/sim_internal (/u/users/lxd/.ssh/sim_internal)
$ ssh -o BatchMode=yes gitsrvsim hostname
gitsrvsim

But cargo build still fails:

cargo build --verbose
    Updating registry `https://github.com/rust-lang/crates.io-index`
    Updating git repository `ssh://gitsrvsim/usr/abaqus60/GITrepo/sma_rust.git`
Unable to update ssh://gitsrvsim/usr/abaqus60/GITrepo/sma_rust.git

Caused by:
  failed to fetch into /rd/gen/lxd/do_not_delete/multirust/.cargo/git/db/sma_rust-0fec95efab468a0c

Caused by:
  failed to authenticate when downloading repository

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

My quick googling suggests that git's credential-helper is primarily used for HTTPS authentication. No one seems to use it for ssh (likely because git can use ~/.ssh/config). My git is not new enough to have the credential-helper subsystem.

So I can't really tell where the problem lies. Currently running `cargo 0.9.0-nightly (4739ba1 2016-02-16)

Thanks!

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions