Open
Description
Summary 💡
A built-in transport that allows to manually configure an SSH connection without the need for the ssh
program.
Candidates for the ssh
part are:
russh
- Rust- even with limited support for
ssh-agent
, which makes it something I'd seriously look at
- even with limited support for
ssh2
- Rust bindings tolibssh2
libssh2
- C library- used by
libgit2
- desirable license, but different feature set, maybe less mature than
libssh
- used by
libssh
- C library- Maybe more mature than
libssh2
, but has undesirable license
- Maybe more mature than
Motivation 🔦
Cargo should be standalone, and right now it needs the ssh
-program to clone ssh://
URLs. Even though this is beneficial on Linux, it's usually not very portable and often won't work at all on Windows. git2
has ssh
support built-in using libssh
which works, but has a less desirable license than libssh2
.
References
- needs a notion of a SSH-Key in this struct by making it an
enum
- Maybe more is needed to support all
git2
ssh configuration options, which is whatcargo
caters to and is implemented with.
- Maybe more is needed to support all
- Implement a
sync
(or async if needed) version of theTransport
trait - The entrypoint to connect using the
ssh
program, along with the the git-upload-pack invocation
Suggestions
- Try to add an actual test using the existing ssh transport to create a connection to a local (and controlled) ssh daemon. This could be very useful when testing a new implementation.
Requirement
- Needs a feature toggle, and added dependencies are optional (but pulled in by the feature)