passworded ssh keys not working with Cred::ssh_key_from_agent on Mac
Nobody has claimed this yet.
- Dominant language
- Rust
- Stars
- 2.1k
- Forks
- 450
- Avg merge
- 11m
- Merged PRs (30d)
- 1
Description
git2-rs (0.19.0) on Mac does not appear to support using passworded ssh keys from ssh-agent. I haven't yet tested on Linux but I'd like to make something that works on both platforms.
I tested with both RemoteConnection (with credentials callback set using Cred::ssh_key_from_agent) and Repository.find_remote(...).fetch(...) with FetchOptions credentials callback using ssh_key_from_agent. I confirmed that the callback is getting called by adding a panic which does hit when trying to connect or fetch.
Minimal repro published to https://github.com/mbanack/git2-ssh-agent-repro
Is there some other library mechanism that supports passworded keys? It appears that the git command line utilities support this by querying ssh-agent, which I assume is accomplished by the system libgit2.
Contributor guide
First steps
- Read the whole issue, then the project's contributing guide.
- Comment on the issue to say you are picking it up — it saves two people doing the same work.
- Fork the repository and make your change on a branch.
- Open a pull request that references the issue number.
Research direction
Start with the linked minimal reproduction and the two credential-callback paths described: RemoteConnection and Repository.find_remote(...).fetch(...). Compare passworded ssh-agent behavior on Mac and Linux; done means passworded keys from ssh-agent work through ssh_key_from_agent on both platforms.
Written by the indexing model from the issue text.
Assessment
- Tech stack
- git, rust
- Domain
- authentication
- Issue type
- Bug
- Difficulty
- 4/5
- Estimated time
- 3-5 days
- Activity status
- Stale
- Clarity
- Needs clarification
- Newbie friendliness
- 30/100