feat(cli): add --env flag for coder ssh (#12991)

This allows environment variables to be set on the SSH session.

Example:

   coder ssh myworkspace --env VAR1=val1,VAR2=val2
This commit is contained in:
Aaron Lehmann
2024-04-22 03:13:48 -07:00
committed by GitHub
parent e17e8aa3c9
commit 8a1216254e
4 changed files with 85 additions and 9 deletions

View File

@ -9,6 +9,9 @@ OPTIONS:
--disable-autostart bool, $CODER_SSH_DISABLE_AUTOSTART (default: false)
Disable starting the workspace automatically when connecting via SSH.
-e, --env string-array, $CODER_SSH_ENV
Set environment variable(s) for session (key1=value1,key2=value2,...).
-A, --forward-agent bool, $CODER_SSH_FORWARD_AGENT
Specifies whether to forward the SSH agent specified in
$SSH_AUTH_SOCK.