Update post-receive.erb

Fixes:
remote: remote: warning: unable to access '/root/.config/git/attributes': Permission denied

By:
Setting HOME and LOGNAME environment variables to correct user when changing privilege so git knows what to use

Adds:
require 'etc'