devpod icon indicating copy to clipboard operation
devpod copied to clipboard

Add send-env and set-env options to ssh command

Open aacebedo opened this issue 1 year ago • 3 comments

Having similar options as SetEnv and SendEnv from the ssh client can be useful.

This PR adds those options to the ssh command.

aacebedo avatar Sep 27 '24 20:09 aacebedo

Hey @aacebedo, thanks for the PR! I'm wondering how this differs from the --workspace-env flag in devpod up, except that you can set env vars per-connection.

Do you have a specific use case in mind?

pascalbreuninger avatar Sep 28 '24 13:09 pascalbreuninger

My UC is the following. I start a container during a CI step through a common template and I don't know before being actually used in the step which variables will be used.

With this, I am able to inject directly the variable I need when I write it. In addition having temporary variables valid for a single command seems better than having to create a new container for each command (when using ssh --command option)

aacebedo avatar Sep 28 '24 18:09 aacebedo

LGTM, both options are supported by SSH so I don't see why we shouldn't support

bkneis avatar Oct 03 '24 11:10 bkneis

I fixed the comment. Will it be possible te review please?

aacebedo avatar Oct 08 '24 06:10 aacebedo

rebased on main and test E2E tests. It is now working

aacebedo avatar Oct 09 '24 06:10 aacebedo

@aacebedo merged!

pascalbreuninger avatar Oct 10 '24 13:10 pascalbreuninger