I'm trying to enforce some policies between a Git and Rational Team Concert using server side hooks. i.e. pre-receive one, but that hook seems not to be fired. Even susbsituting given rational hook with a simple bash shell that rename a file this doesn't appear to be executed. I put the script under /hooks dir with 755 permission, it works fine if executed from the shell. How can I check where problem is? Which log can I look at ?
This is the simple shell I'm trying to execute as pre-receive hook
#!/bin/bash
#
# Licensed Materials - Property of IBM
# (c) Copyright IBM Corporation 2014. All Rights Reserved.
#
# Note to U.S. Government Users Restricted Rights:
# Use, duplication or disclosure restricted by GSA ADP Schedule
# Contract with IBM Corp.
#
#
z40=0000000000000000000000000000000000000000
IFS=' '
date >> /tmp/test.txt
#mv /tmp/ss/daeseguire.txt /tmp/ss/eseguito.txt
exit 1
Thanks in advance
Don't forget that a pre-receive hook is a server-side hook.
That means, if you have a local git repo nested within your RTC sandbox (which is the local checkout of an RTC repo workspace), that local Git repo will not execute a .git/hooks/pre-receive script.
If you have setup the RTC-Git integration, then the official documentation is "Configuring Git and Gerrit server-side hooks".
But it supposes the configuration step is done and working, which means you can look at the Apache log to see if there is any clues.
If you love us? You can donate to us via Paypal or buy me a coffee so we can maintain and grow! Thank you!
Donate Us With