GIT home dir on server is /srv/gitolite with following configuration:
user@server:~/repositories$ ls -al /srv/gitolite/repositories/
total 20
drwxr-x--- 5 gitolite gitolite 4096 Feb 12 21:23 .
drwxr-x--- 8 gitolite gitolite 4096 Feb 12 21:23 ..
drwx------ 8 gitolite gitolite 4096 Feb 12 21:23 gitolite-admin.git
drwxrwx--- 7 gitolite gitolite 4096 Feb 12 21:23 project.git
drwx------ 7 gitolite gitolite 4096 Feb 12 21:23 testing.git
gitolite@server:/$ cat /srv/gitolite/.gitolite/conf/gitolite.conf
repo gitolite-admin
RW+ = admin
repo testing
RW+ = @all
repo project
RW+ = user
gitolite@server:/$ ls -al /srv/gitolite/.gitolite/keydir/
drwx------ 2 gitolite gitolite 4096 Feb 12 20:55 .
drwx------ 8 gitolite gitolite 4096 Feb 10 23:03 ..
-rw-r--r-- 1 gitolite gitolite 404 Feb 10 23:03 admin.pub
-rw-rw---- 1 gitolite gitolite 404 Feb 11 22:30 user.pub
-rw-rw---- 1 gitolite gitolite 393 Feb 12 20:55 test.pu
On local machine I did:
mato@machine:/tmp$ mkdir test
mato@machine:/tmp$ cd test/
mato@machine:/tmp/test$ vim file.txt
mato@machine:/tmp/test$ git init
Initialized empty Git repository in /tmp/test/.git/
mato@machine:/tmp/test$ git remote add origin user@server:repositories/project.git
mato@machine:/tmp/test$ git add .
mato@machine:/tmp/test$ git commit -m 'test'
[master (root-commit) cb6bc87] test
1 file changed, 1 insertion(+)
create mode 100644 test.txt
mato@machine:/tmp/test$ git push origin master:refs/heads/master
Counting objects: 3, done.
Writing objects: 100% (3/3), 215 bytes, done.
Total 3 (delta 0), reused 0 (delta 0)
remote: ENV GL_RC not set
remote: BEGIN failed--compilation aborted at hooks/update line 20.
remote: error: hook declined to update refs/heads/master
To user@server:repositories/project.git
! [remote rejected] master -> master (hook declined)
error: failed to push some refs to 'user@server:repositories/project.git'
Why I can not push project file.txt to GIT server? Do I have to change some permissions on server? Or what I did wrong?
Thanks for any advice.