I have a git repository setup on Media template gs hosting. I'm using a post-receive hook to deploy my application when I push to the origin. The hook runs fine, but if I try and make it update a working copy it fails to due to a permissions error. This is my post-receive hook:
#!/bin/bash
GIT_WORK_TREE=/home/path/to/workingcopy/ git checkout -f
When the git hook runs it appears to run as the user 'me%mydomain.com' but the owner of my working files is 'mydomain.com'
I've tried setting git config --global user.email "mydomain.com". But it does not seem to effect it.
Is it possible to make the git hook run the correct user?