I installed gitosis and redmine and am running it through apache/passenger on CentOS. The problem is I cannot access the repositories through redmine. The error being "The entry or revision was not found in the repository.
My repository is stored at
/home/zenna/repositories/myproject.git
The error (found in the apache logs) is "fatal: Not a git repository: '/home/zenna/repositories/myproject.git'"
It clearly is a repository as it all works fine with the WeBrick server. I think it's probably an issue with the apache/passenger permissions
So I tried chowning the myproject.git
folder with apache:apache
. That didn't work I thought perhaps the directory's parents must also be accessible by the apache user, so I tried creating a symbolic link at /myproject.git
to /home/zenna/repositories/myproject.git. That didn't work either
Someone in the forums suggested:
You run script/server w/a user that has a public cert in the gitosis repos, but the apache/passenger user doesn't. Simple solution… create a cert for your passenger user. Add it to gitosis server and assign permissions in gitosis.conf. I gave my apache user read permissions on the entire direstory and all files / folders within.
However, I run apache user with sudo /usr/sbin/apachectl start
Does this mean I would have to create a public key for root and add root to my gitosis.conf? What is the actual user trying to access the repository through redmine, root? apache? passenger?
Thanks
尝试/home/zenna/repositories/myproject.git/.git并确保Apache用户可以读取。
If myproject.git is a bare repo and resides on the same server as redmine, then put in the full file path to myproject.git.
So instead of gituser@domain:myproject.git, use /home/gituser/repositories/myproject.git
当使用乘客时,实际用户不是谁,因此必须确保该目录(包括其所有父目录)都可以被没人用户读取。
The technical post webpages of this site follow the CC BY-SA 4.0 protocol. If you need to reprint, please indicate the site URL or the original address.Any question please contact:yoyou2525@163.com.