Hi Ryan,
Thanks of your reply and help, i did get rid off the permission error,
by having assigned the depot group ownership directory tree to apache.
My trac env is located in /var/lib/trac/uuuu
Here is the ls -l /home/jdum/gtrac/.git/hooks of my depot
drwxr-xr-x. 2 jdum apache 4096 28 mai 21:02 .
drwxr-xr-x. 8 jdum apache 163 28 mai 21:02 ..
-rwxr-xr-x. 1 jdum apache 452 28 mai 21:02 applypatch-msg.sample
-rwxr-xr-x. 1 jdum apache 896 28 mai 21:02 commit-msg.sample
-rwxr-xr-x. 1 jdum apache 107 28 mai 21:02 post-commit
-rwxr-xr-x. 1 jdum apache 445 28 mai 21:02 post-receive
......
# The post receive hook looks like --------------------------------------------------------------------------------
tracenv=/var/lib/trac/uuuu # change with your Trac environment's path
repos="(default)" # change with your repository's name
while read oldrev newrev refname; do
if [ "$oldrev" = 0000000000000000000000000000000000000000 ]; then
git rev-list --reverse "$newrev" --
else
git rev-list --reverse "$newrev" "^$oldrev" --
fi | xargs sudo trac-admin "$tracenv" changeset added "$repos"
done
# The post commit hook looks like ---------------------------------------------------------------------------------------
#!/bin/bash
REV=$(git rev-parse HEAD)
sudo trac-admin /var/lib/trac/uuuu changeset added "(default)" $REV
# ------------------------------------------------------------------------------------------------------------------------------------
Here is part of the batch script i used to register my depot with trac
if [[ -r $GIT_REPO_DIR && -x $GIT_REPO_DIR ]]
then
cd $(dirname $GIT_REPO_DIR)
rev=$(git rev-parse HEAD)
sudo trac-admin "$PROJECT_DIR" changeset added "(default)" $rev && _mok "$GIT_REPO_DIR is synced with trac database"
sudo trac-admin $PROJECT_DIR repository resync "(default)" $rev && _mok "$GIT_REPO_DIR is resynced with trac database"
#sudo trac-admin "$PROJECT_DIR" repository alias "gtrac" "(default)" && _mok "$GIT_REPO_DIR set alias for (default)"
#_mdbg 2 "Repo: $GIT_REPO_DIR is readable"
else
_mnok "Repo is not readable"
exit 4
fi
#------------------------------------------------------------------------------------------------------------------------------------
Attached are my trac.log file (uuuu.log)
my trac.ini
some screen shots on the trac web interface side.
Attached are some web trac interface (depot view)
Otherwise i'm using Centos 7, and trac 1.2.3
So far, i registered the depot with trac,
then i make some change in my depot /home/jdum/gtrac
e.g: >fff ; git add fff; git commit -m "ffff added"; git push
The post-commit hooks proceed, it appears in the log file
But in the depot section in the web trac admin interface
There's no sign of the commit's made, and no sign of the trac browser either.
Thanks for your time and help
Mfg
Jacques