Welcome to OGeek Q&A Community for programmer and developer-Open, Learning and Share
Welcome To Ask or Share your Answers For Others

Categories

0 votes
1.1k views
in Technique[技术] by (71.8m points)

git clone git@myserver:gitolite-admin fails

I am trying to get an git server repository running. I did install gitolite

when running git info over ssh the server answers

ssh git@myserver info

hello Brian, this is git@hepide01pep1 running gitolite3  on git 1.6.3.2
R W   testing

When trying to clone the gitolite-admin repository I get the following error

git clone git@myserver:gitolite-admin

Cloning into 'gitolite-admin'...
FATAL: R any gitolite-admin Brian DENIED by fallthru
(or you mis-spelled the reponame)
fatal: The remote end hung up unexpectedly

Same thing happens with this syntax

git clone ssh://git@myserver/gitolite-admin 
Cloning into 'gitolite-admin'...
FATAL: R any gitolite-admin Brian DENIED by fallthru
(or you mis-spelled the reponame)
fatal: The remote end hung up unexpectedly

Cann anybody give me some useful hints? I checked the Answers here and on the web but didn't find anything that helped me any further.

See Question&Answers more detail:os

与恶龙缠斗过久,自身亦成为恶龙;凝视深渊过久,深渊将回以凝视…
Welcome To Ask or Share your Answers For Others

1 Reply

0 votes
by (71.8m points)

The accepted answer is a good one if you you're just setting up gitolite, but if you're a new user to an existing installation, you'll get the same error as the one in the question unless you've been added as an administrator.

If you have shell access to the server gitolite lives on, login and switch to the user that gitolite users - usually called git.

Once logged into the gitolite user, go to the conf file and give yourself RW+ rights on the gitolite-admin repo. Gitolite conf is usually in /home/git/.gitolite/conf/gitolite.conf (assuming username is git). For a gitolite user named Peaches, grant the permissions thusly:

repo gitolite-admin
    RW+     =   OriginalAdmin Peaches

Save the file, and run setup from the command line, still as the gitolite user:

gitolite setup

If you've been setup as a user correctly, you should be able to clone now.

For more on adding users, see the documentation


与恶龙缠斗过久,自身亦成为恶龙;凝视深渊过久,深渊将回以凝视…
OGeek|极客中国-欢迎来到极客的世界,一个免费开放的程序员编程交流平台!开放,进步,分享!让技术改变生活,让极客改变未来! Welcome to OGeek Q&A Community for programmer and developer-Open, Learning and Share
Click Here to Ask a Question

...