Gitolite error .gitolite.rc' seems to be for o

2019-02-19 09:46发布

I have installed gitolite using rpm in centos6 ie gitolite-2.3.1-1.el6.noarch.rpm and after rpm installation I have run the gl-setup.
I am trying to access repo over http. When I try to clone git clone http://server.name/git/gitoliteadmin.git it gives error:

FATAL: '/var/opt/jet/gitolite/.gitolite.rc' seems to be for older gitolite; please see doc/g2migr.mkd
(online at http://gitolite.com/gitolite/g2migr.html)

Premature end of script headers: gitolite-shell

Below is my htpd.conf configuration

<VirtualHost 10.111.123.17:80>
ServerName server.name
LogLevel Debug
SetEnv GIT_HTTP_EXPORT_ALL
SetEnv GITOLITE_HTTP_HOME /var/opt/gitolite
SetEnv GIT_PROJECT_ROOT /var/opt/gitolite/repositories
SetEnv REMOTE_USER=$REDIRECT_REMOTE_USER
ScriptAlias /git/ /opt/git_install/gitolite-master/src/gitolite-shell/
SetEnv /usr/libexec/git-core/git-http-backend

<Location /git>
  AuthType Basic
  AuthName "Git CLone"
  AuthBasicProvider ldap
  AuthzLDAPAuthoritative on
  Require valid-user
  Order allow,deny
  Allow from all
</Location>

<LocationMatch "^/git/.*/git-receive-pack$">
        Order deny,allow
        Deny from All
        AuthName "GIT Repo"
        AuthType Basic
        AuthBasicProvider ldap
        AuthzLDAPAuthoritative On
        Require valid-user
</LocationMatch>
</VirtualHost>

Not sure what is wrong. Also while rpm installation the gitolite-shell was not part of rpm package.
So I downloaded the zip file from sitaramc and added the gitolite-shell path.

What am I missing?

标签: git gitolite
1条回答
来,给爷笑一个
2楼-- · 2019-02-19 10:16

You have installed through rpm an old version of gitolite: a V2 instead of the more mature V3 (which includes gitolite-shell).

I would recommend installing gitolite by cloning the GitHub repo

git clone git://github.com/sitaramc/gitolite

And following the installation documentation for Gitolite V3.
And then follow git gitolite setup:

gitolite setup -pk alice.pub

(that is the new form of what used to be gl-setup in gitolite V2)

查看更多
登录 后发表回答