In this blog I show you how to set ssh and sudoers for passing environment variables on Linux machines. We use it to set the name of the administrator who commits the changes to the repository (see gitkeeper).
...
export GIT_AUTHOR_NAME="Tomas Jurman"
...
~/.ssh/config
...
SendEnv GIT_*
...
...
AcceptEnv GIT_*
...
/etc/sudoers
...
Defaults env_reset
Defaults env_keep +="GIT_AUTHOR_NAME"
...
Example
Client side
~/.bashrc...
export GIT_AUTHOR_NAME="Tomas Jurman"
...
~/.ssh/config
...
SendEnv GIT_*
...
Server side
/etc/SSHD_HOME/sshd_config...
AcceptEnv GIT_*
...
/etc/sudoers
...
Defaults env_reset
Defaults env_keep +="GIT_AUTHOR_NAME"
...
No comments:
Post a Comment