panamax-rs / panamax

Mirror rustup and crates.io repositories, for offline Rust and cargo usage.
Apache License 2.0
443 stars 46 forks source link

Not working over SSH #75

Closed mainrs closed 1 year ago

mainrs commented 2 years ago

I usually set net.git-fetch-with-cli=true inside .cargo/config.toml. However, this does not work with panamax. Taking a look at the documentation reveals that CARGO_NET_GIT_FETCH_WITH_CLI can also be used. But that does not work for panamax as well.

k3d3 commented 2 years ago

That makes sense, as Panamax only exposes an HTTP(S) server for interacting with git, rather than SSH.

I'm unfortunately not experienced with integrating SSH with git, so I'm not sure how to do that within Panamax. Perhaps using the thrussh library would be useful, but I'm not sure where to go from there.

mainrs commented 2 years ago

Do you rely on external commands within panamax? Or do you use dedicated libraries to interact with git and cargo? The former can probably be solved by passing down environment variables for example.

k3d3 commented 2 years ago

I believe git is the only external dependency, and that's just for serving: https://github.com/panamax-rs/panamax/blob/master/src/serve.rs#L294

Basically Panamax acts as a CGI gateway to git http-backend.

k3d3 commented 1 year ago

Hey, are you still having this issue @mainrs ?

k3d3 commented 1 year ago

I'm going to close this issue for now. Feel free to reopen it if it's still an issue for you.