git-proxy icon indicating copy to clipboard operation
git-proxy copied to clipboard

SSH support

Open adamj-codethink opened this issue 4 years ago • 4 comments

Is your feature request related to a problem? Please describe. I may be mistaken, but i am wondering how GitProxy may work if someone uses SSH instead of HTTP when pulling/pushing to a Git repo.

Is this something that is already supported, if not could this be added?

Describe the solution you'd like Support SSH when pulling/pushing to Github.

Describe alternatives you've considered Of course HTTP/S will work for now.

Additional context I did check the README and previous issues, but i could not find anything related to SSH, so this is just an issue to investigate.

adamj-codethink avatar Sep 29 '20 16:09 adamj-codethink

[+ @maoo] We had some discussions around this - right now, it doesn't support SSH, certainly on the list to do - need to look into how we can use the proxy as an SSH tunnel (certainly doable!)

Let's use this Issue to discuss the potential design/solutions/pitfalls

grovesy avatar Sep 29 '20 16:09 grovesy

The ssh2 library seems interesting, especially the server example posted on https://github.com/mscdex/ssh2#server-examples

Also found https://www.npmjs.com/package/tunnel-ssh , which is based on ssh2, though I could not find a way to intercept the connection payload.

The challenge, as far as I can see, is to connect SSH incoming connections with body parsing and routing currently developed for the http endpoint:

const proxyApp = require('express')();
...
proxyApp.use(bodyParser.raw(options));
proxyApp.use('/', routes);

See https://github.com/finos/git-proxy/blob/main/src/proxy/index.js#L16

maoo avatar Oct 31 '23 10:10 maoo

@maoo - can we close this off now?

JamieSlome avatar Jul 01 '24 16:07 JamieSlome

@maoo - can we close this off now?

Don't think that SSH is supported by Git Proxy right now, unless I missed some developments. If that's the case, I'd keep this issue open.

maoo avatar Jul 02 '24 11:07 maoo