Opened 4 years ago

Last modified 3 years ago

#9134 new defect

git post-receive hook - remote: error: command not found

Reported by: jeff@… Owned by: hvr
Priority: high Component: GitPlugin
Severity: normal Keywords: post-receive hook
Cc: Trac Release: 0.12


I tried looking, but couldn't find any other tickets that reference this issue. Basically I had set up the post-receive hook and everything was working fine. I had used the code from the example in the install documentation. Well recently I've noticed that it hasn't been running and I've been getting a "remote: Error: Command not found" when I commit to the git repository. I'm not very familiar with what could be causing this now... there's nothing that I could think of that has changed since I had it working just a few days ago. Any ideas of where to figure out what is going on would be absolutely great!

thanks, Jeff

Attachments (0)

Change History (3)

comment:1 Changed 4 years ago by anonymous

I have a similar situation with trac 0.12. It has been running for 14 days now and I wanted to switch to resyncing via the documented post-receive-hook. We also got the error of a command not being found. After making sure all paths were absolute and following symlinks, we fell back to syncing via cronjob:


source /home/<username>/virtualRoot/bin/activate && /home/<username>/virtualRoot/bin/trac-admin /home/<username>/tracEnv/ repository sync <RepoName>

Syncing is fast and we don't really need immediate updates, so this workaround works for us, but I would like to be helping with debugging this anyway.

comment:2 Changed 4 years ago by tss.soft@…

I had the same problem some time ago and it was a permission problem. The user running the script needs write-access to the trac-logfile (<your trac environment>/log/trac.log). It could be a different problem for you because "Error: Command not found" is quite generic and could mean anything but that was the solution for me.

comment:3 Changed 3 years ago by anonymous

The error message 'Error: Command not found' can be generated by trac-admin itself when it lack of permission. This can be easily pointed with execution trac-admin /path/to/trac/env from user running post-receive hook.

Add Comment

Modify Ticket

as new The owner will remain hvr.

E-mail address and user name can be saved in the Preferences.

Note: See TracTickets for help on using tickets.