Changes between Version 88 and Version 89 of GitPlugin
- Timestamp:
- Jan 10, 2013, 4:21:03 PM (11 years ago)
Legend:
- Unmodified
- Added
- Removed
- Modified
-
GitPlugin
v88 v89 142 142 [attachment:trac-post-receive-hook-0.12-new-commits-from-all-branches.py] - example that adds to Trac all commits, ensuring that every commit is added only once. 143 143 144 [attachment:trac-post-receive-hook-0.12-new-commits-from-all-branches-with-logfile.py] - the previous one, but with a little change in the REPO_NAME, and adding a log file to detect error. I have not tested it with other repositories different to the default one. I suggest that to use one of the two post-receive files, take in consideration the user's brand ofexec (I suggest in debian use the user git that belongs to the group www-data):144 [attachment:trac-post-receive-hook-0.12-new-commits-from-all-branches-with-logfile.py] - the previous one, but with a little change in the REPO_NAME, and adding a log file to detect error. I have not tested it with other repositories different to the default one. I suggest that to use one of the two post-receive files, take in consideration the user's permission for exec (I suggest in debian use the user git that belongs to the group www-data): 145 145 146 146 To test post-receive … … 148 148 {{{ 149 149 #!sh 150 /srv/git/myrepo .git/hooks/trac-post-receive-hook-0.12-new-commits-from-all-branches-with-logfile.py &>> /tmp/tracgitplugin.log150 /srv/git/myrepo/.git/hooks/trac-post-receive-hook-0.12-new-commits-from-all-branches-with-logfile.py &>> /tmp/tracgitplugin.log 151 151 }}} 152 152 … … 155 155 {{{ 156 156 #!sh 157 /srv/git/myrepo .git/hooks/trac-post-receive-hook-0.12-new-commits-from-all-branches-with-logfile.py &> /dev/null158 }}} 159 160 Its is important that your git user have access to read the trac.ini and his directory, and also modify access to the trac.db file and his directory as well. This is made by adding the git to the apache2 group (in debian www-data group). If you use log file configured in your trac.ini, it is important that the user have the modify grandalso, and the directory as well.157 /srv/git/myrepo/.git/hooks/trac-post-receive-hook-0.12-new-commits-from-all-branches-with-logfile.py &> /dev/null 158 }}} 159 160 Its is important that your git user have access to read the trac.ini and his directory, and also modify access to the trac.db file and his directory as well. This is made by adding the git to the apache2 group (in debian www-data group). If you use log file configured in your trac.ini, it is important that the user have the modify permission also, and the directory as well. 161 161 162 162 If you are using Gitorious, there is a [https://github.com/wallunit/trac-gitorious-web-hook CGI script], you can configure as !WebHook.