Gitlab 7.8 post-recieve custom hook is not working
I was trying get post-receive hook work through custom hooks but it seems like not working. pre-recieve hooks seems to be working just fine.
Here is what i have tried
- cd /var/opt/gitlab/git-data/repositories/star/champ.git/custom_hooks
- Added the below lines in post receive file, this is to push any changes to pushed to camp.git repository in gitlab server to a different server vi post-receive #!/usr/bin/env ruby system 'git push -f origin --mirror' 3.Cloned the repository and did a push, but the changes are not getting pushed to the remote server. Anyone has any idea how to get this working ?
PS: same thing if i add in pre-receive hook, it works just fine. but pre-receive hook pushes changes to remote server before the gitlab server accepts the changes. so I can't use this Also, If i remove the soft link between hooks and /opt/gitlab/embedded/service/gitlab-shell/hooks then put a normal post-receive hook file inside hooks directory, it works just fine.