Re: git daemon --access-hook problem
On Fri, May 31, 2013 at 10:22 PM, Eugene Sajine eugu...@gmail.com wrote: and trying to perform some operations like fetch or push. It is cloned and fetches and pushes successfully. The problem is that the file test_hook_out.txt doesn't have anything in it after the execution, So the hook doesn't seem to work. What might be the issue here? I have no idea what the issue might be, but here's how I usually debug this kind of situations: - Exit with a non-zero value will make it an error, try exit 1 at the end of your script, you will know if it's executed or not - Your log file might not be located where you expect, you should use absolute path to dump text - Dump the cwd to know where it's executed from - The documentation says you can print one line before a failure, also try this to show the cwd Hope that helps, Antoine, -- To unsubscribe from this list: send the line unsubscribe git in the body of a message to majord...@vger.kernel.org More majordomo info at http://vger.kernel.org/majordomo-info.html
Re: git daemon --access-hook problem
- Your log file might not be located where you expect, you should use absolute path to dump text You were right! The problem was with the script itself - the log file not being specified with absolute path! Stupid me! ... - The documentation says you can print one line before a failure, also try this to show the cwd Would you be able to advise how this should be done? I don't get the error message (i mean the output of pwd) if i do this: echo `pwd` exit 1 What should it be? Thanks! Eugene Hope that helps, Antoine, -- To unsubscribe from this list: send the line unsubscribe git in the body of a message to majord...@vger.kernel.org More majordomo info at http://vger.kernel.org/majordomo-info.html
Re: git daemon --access-hook problem
On Mon, Jun 3, 2013 at 8:02 PM, Eugene Sajine eugu...@gmail.com wrote: Would you be able to advise how this should be done? I don't get the error message (i mean the output of pwd) if i do this: echo `pwd` exit 1 What should it be? Actually, after digging into the code, it looks like you need to call git-daemon with --informative-errors if you want to allow custom errors. Maybe there is place for improvement in the documentation. Cheers, -- To unsubscribe from this list: send the line unsubscribe git in the body of a message to majord...@vger.kernel.org More majordomo info at http://vger.kernel.org/majordomo-info.html
Re: git daemon --access-hook problem
Anybody? Any ideas? Thanks in advance! Eugene On Fri, May 31, 2013 at 4:22 PM, Eugene Sajine eugu...@gmail.com wrote: Hi, I'm trying to test this new feature and having problems getting any results in the following scenario: i have a repo in local folder /home/users/myuser/repos/projectA/.git i start the daemon with the following: git daemon --export-all --base-path=/home/users/myuser/repos --enable=receive-pack --access-hook=/home/users/myuser/test_hook.bash test_hook.bash has the following: #!/bin/bash echo $@ test_hook_out.txt echo $REMOTE_ADDR test_hook_out.txt the hook is set to be executable - otherwise it complains when i do anything via git protocol, which proves that it seems to or check the hook: then i did: cd ~/tmp/ git clone git://myhost/projectA projectA cd projectA and trying to perform some operations like fetch or push. It is cloned and fetches and pushes successfully. The problem is that the file test_hook_out.txt doesn't have anything in it after the execution, So the hook doesn't seem to work. What might be the issue here? Thanks, Eugene -- To unsubscribe from this list: send the line unsubscribe git in the body of a message to majord...@vger.kernel.org More majordomo info at http://vger.kernel.org/majordomo-info.html
git daemon --access-hook problem
Hi, I'm trying to test this new feature and having problems getting any results in the following scenario: i have a repo in local folder /home/users/myuser/repos/projectA/.git i start the daemon with the following: git daemon --export-all --base-path=/home/users/myuser/repos --enable=receive-pack --access-hook=/home/users/myuser/test_hook.bash test_hook.bash has the following: #!/bin/bash echo $@ test_hook_out.txt echo $REMOTE_ADDR test_hook_out.txt the hook is set to be executable - otherwise it complains when i do anything via git protocol, which proves that it seems to or check the hook: then i did: cd ~/tmp/ git clone git://myhost/projectA projectA cd projectA and trying to perform some operations like fetch or push. It is cloned and fetches and pushes successfully. The problem is that the file test_hook_out.txt doesn't have anything in it after the execution, So the hook doesn't seem to work. What might be the issue here? Thanks, Eugene -- To unsubscribe from this list: send the line unsubscribe git in the body of a message to majord...@vger.kernel.org More majordomo info at http://vger.kernel.org/majordomo-info.html