Since SSH URI's in Stash have the username set to "git", is the username of the current user available to server side git hooks like pre-commit? We'd like to be able to restrict commits to specific repositories or branches to select users.
The current user is available to all of git's hooks whether it be via SSH or HTTP/HTTPS through the REMOTE_USER environment variable. In HTTP we resolve the user via their basic authentication credentials. In SSH we resolve the user via their SSH key.
Online forums and learning are now in one easy-to-use experience.
By continuing, you accept the updated Community Terms of Use and acknowledge the Privacy Policy. Your public name, photo, and achievements may be publicly visible and available in search engines.
You must be a registered user to add a comment. If you've already registered, sign in. Otherwise, register and sign in.