GIT主目錄是/與下面的配置SRV/gitolite:GIT:未能一些裁判推到 '用戶名@服務器:倉庫/ project.git' 在服務器上
[email protected]:~/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 @服務器:/ $貓/srv/gitolite/.gitolite/conf/gitolite.conf
repo gitolite-admin
RW+ = admin
repo testing
RW+ = @all
repo project
RW+ = user
[email protected]:/$ 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
在本地機器上我所做的:
[email protected]:/tmp$ mkdir test
[email protected]:/tmp$ cd test/
[email protected]:/tmp/test$ vim file.txt
[email protected]:/tmp/test$ git init
Initialized empty Git repository in /tmp/test/.git/
[email protected]:/tmp/test$ git remote add origin [email protected]:repositories/project.git
[email protected]:/tmp/test$ git add .
[email protected]:/tmp/test$ git commit -m 'test'
[master (root-commit) cb6bc87] test
1 file changed, 1 insertion(+)
create mode 100644 test.txt
[email protected]:/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 [email protected]:repositories/project.git
! [remote rejected] master -> master (hook declined)
error: failed to push some refs to '[email protected]:repositories/project.git'
爲什麼我不能推項目file.t xt到GIT服務器?我必須更改服務器上的某些權限嗎?或者我做錯了什麼?
感謝您的任何建議。
您的問題肯定是這片:'混帳推起源主:裁判/ heads/master'嘗試'git push --set-upstream origin master' – sircapsalot
[gitolite push error - > remote:ENV GL \ _RC not set]的可能重複(http://stackoverflow.com/questions/5233058/gitolite -push-error-remote-env -gl -rc-not-set) – jszakmeister
@sircapsalot'git push --set-ups ream原點大師「沒有幫助。還是同樣的錯誤:-( – martin