after some time I finally made the trac connect with git, but now I'm having problem setting the post-receive hook.
My git user is part of www-data group, and www-data also parta of git group. But the problem is this, the post-receive hook uses this code(python) to do call to trac-admin:
args = [TRAC_ADMIN, TRAC_ENV, 'changeset', 'added', REPO_NAME] + commits
call(' '.join(args), shell = True)
This call the following in a shell:
/usr/bin/trac-admin /var/lib/trac/MyTrac changeset added /home/git/repositories/mynewrepo.git/ 372ba439b9fa430c932095de608cb084d6ab98eb
But when I go to trac and to the ticket that should be referenced by the commit that was done, I get nothing.
But, what is more odd, if I simply copy the call and run it in the terminal(in the server), then the ticket gets updated.
I tested again, this time, I've done a new commit, and again no ticket updated, then in the server done:
su git
And called the command, and saw that no ticket was updated... Then, calling it with root I can make it work...
So, whats going on here? Why can my git user call the trac-admin?
I don't know if this is part of the problem, but when I run which trac-admin, I get:
/usr/bin/trac-admin
And this is owned by root.
How am I supposed to make git user call trac-admin then?
Thanks