本文介绍了在Centos 6.4上安装gitolite v3。第二个用户正在请求密码的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧! 问题描述 请帮我明白我做错了什么。我有服务器在CentOS 6.4和我需要安装gitolite v3。我在做什么?我第一次使用下一个命令安装一个:Please help me to understand what i am doing wrong. I have server on CentOS 6.4 and I need to install gitolite v3. What am i doing? by the first i am install one using next command:yum install git* perl-Time-HiResuseradd -m --system --shell /bin/bash --user-group gitolitesu - gitolitemkdir binecho "PATH=$HOME/bin:$PATH" > .bash_profilesource .bash_profilessh-keygen -t rsacp .ssh/id_rsa.pub ./gitolite.pubgit clone git://github.com/sitaramc/gitolitegitolite/install -lngitolite setup -pk gitolite.pub安装成功。比我克隆gitolite-admin存储库:Install was successful. Than I clone gitolite-admin repositories:git clone gitadmin:gitolite-admincd gitolite-admin/keydir并为新用户生成公钥(lodar.pub)And generate public key for the new user(lodar.pub)ssh-keygen -t rsa -f lodarmv ./lodar ../../.ssh/lodar比我编辑conf / gitolite.conf:Than i edit conf/gitolite.conf:repo gitolite-admin RW+ = gitoliterepo testing RW+ = @allrepo empty RW+ = lodar提交所有更改:git add keydir/lodar.pubgit commit -m 'add user lodar and new repo empty'git push这就是全部。推送也成功了。所有操作后我创建了.ssh / config And that is all. Push was successful too. After all manipulation i created .ssh/configHost gitadmin User gitolite Hostname 192.168.0.1 Port 22 IdentityFile ~/.ssh/gitoliteHost gitlodar User gitolite Hostname 192.168.0.1 Port 22 IdentityFile ~/.ssh/lodar但如果我尝试使用ssh gitlodar [email protected]'s password:我必须输入密码。ssh gitadmin infohello, gitolite, this is gitolite@lodar-14452 running gitolite3 v3.5.1-4-g2f48a3e on git 1.7.1R W gitolite-amdinR W testing我做错了什么? 推荐答案您已:mv ./lodar ../../.ssh/lodar / p> I supposed you meantcp ./lodar.pub ../../.ssh/mv ./lodar ../../.ssh/因为如果您不复制〜/ .ssh ,您将无法在ssh会话中使用它。Because if you don't copy the public key in ~/.ssh, you wouldn't be able to use it in an ssh session.但另一个错误是在您的〜/ .ssh / config 文件:But the other mistake is in your ~/.ssh/config file:Host gitlodar User gitolite # not loadar! Hostname 192.168.0.1 Port 22 IdentityFile ~/.ssh/lodar $ b b 请参阅 gitolite之类的计划如何工作?: 想法是始终使用同一个用户连接到gitolite服务器(在您的情况下,连接为 gitolite '),并打开一个非交互式外壳。 force-command ssh行将调用gitolite脚本,并使用一个表示用户名的参数(这里' loadar '),因为该名称是使用〜gitolite / .ssh / authorized_keys 。See "How do programs like gitolite work?":The idea is to always use the same user to connect to the gitolite server (in your case, connect as 'gitolite'), and open an *non-interactive shell.The force-command ssh line will call the gitolite script with a parameter representing the name of the user (here 'loadar'), because that named is registered with the public key in the ~gitolite/.ssh/authorized_keys. 这篇关于在Centos 6.4上安装gitolite v3。第二个用户正在请求密码的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持! 09-27 09:49