Add GIT_SYNC_ROOT change for non-root user in docs/ssh (#354)
* Add GIT_SYNC_ROOT change for non-root user in docs/ssh https://github.com/kubernetes/git-sync/pull/97\#issuecomment-800606819 * linewrap * minor * Add GIT_SYNC_ROOT change for non-root user in docs/ssh https://github.com/kubernetes/git-sync/pull/97\#issuecomment-800606819 * linewrap * minor * minor
This commit is contained in:
parent
f28d802e7c
commit
32828834a7
|
|
@ -106,7 +106,10 @@ that this is a Pod-wide setting, unlike the container `securityContext` above.
|
|||
If you want git-sync to run as a different (non-root) UID and GID, you can
|
||||
change these last blocks to any UID/GID you like. SSH demands that the current
|
||||
UID be present in /etc/passwd, so in this case you will need to add the
|
||||
`--add-user` flag to git-sync's args array.
|
||||
`--add-user` flag to git-sync's args array. Also, you need to change
|
||||
`GIT_SYNC_ROOT` to some other location, say `/workspace`, instead of
|
||||
`$HOME/git` as the `$HOME` will be `/` for the user and `GIT_SYNC_ROOT` will
|
||||
end up in `//git` which which the non-root user can't create.
|
||||
|
||||
**Note:** Kubernetes mounts the Secret with permissions 0444 by default (not
|
||||
restrictive enough to be used as an SSH key), so make sure you set the
|
||||
|
|
|
|||
Loading…
Reference in New Issue