Gitolite - 如何创建用户?
我尝试按照本手册安装 git + gitolite -使用服务器的 root 安装。 我只是不明白新的 gitolite 用户是否必须拥有自己的用户帐户?。当我将 tester.pub 密钥添加到 keydir 文件夹并配置对某些存储库的访问时,git 总是要求输入密码,并且不允许我克隆任何
git clone [email protected]:testrepo
Initialized empty Git repository in /home/testuser/git/testrepo/.git/
[email protected]'s password:
Permission denied (publickey,password).
fatal: The remote end hung up unexpectedly
我不相信的 内容创建系统帐户(adduser testuser)是必要的,因为即使没有服务器的 root 访问权限,gitolite 也应该是可安装和可配置的。
那么有人可以告诉我我误解了什么吗?
非常感谢。
编辑:
嗯...我使用客户端安装重新安装 gitolite 转录。现在,添加并推送新的发布密钥成功更改了服务器上我的 git 用户的 ~/.ssh/authorized_keys 。所以这看起来比我第一次尝试要好。 但我仍然无法从另一个地方克隆任何存储库。 当我尝试使用 msysgit 为我的 Windows PC 添加 pub key + 编辑配置时,然后尝试
$ git clone [email protected]:project.git
cloning into project...
Fatal ERROR: unable to authenticate
Fatal: the remote end hung up unexpectedly
另一方面,当尝试另一个Linux时,它仍然要求输入密码。
# git clone [email protected]:project.git
Cloning into project...
[email protected]'s password:
即使我为git用户提供密码:
fatal: 'project.git' does not appear to be a git repository
fatal: The remote end hung up unexpectedly
这可能是由损坏的系统帐户引起的。
现在我真的不知道该怎么办 - 我应该在每个客户端上以某种方式创建 .ssh/config 才能使其工作吗?
现在我开始有点恼火和不安,我可能会删除所有内容并尝试 Mercurial:-D 除非有人可以帮助我:)谢谢。
I tried to install git + gitolite following this manual - using root instalation from server.
I just do not understand if new gitolite users have to have their user accounts?. When I add tester.pub key into keydir folder and configure access to some repository, git always ask for a password and do not allow me to clone anything
git clone [email protected]:testrepo
Initialized empty Git repository in /home/testuser/git/testrepo/.git/
[email protected]'s password:
Permission denied (publickey,password).
fatal: The remote end hung up unexpectedly
I don't believe that create system account (adduser testuser) is neccessarry because gitolite should be installable and configurable even without root access onto server.
So could anybody please show me what I have misunderstood?
Thank you very much.
EDIT:
Well... I reinstall gitolite using client instalation transcript. Now adding and pushing new pub keys successfully changes ~/.ssh/authorized_keys for my git user on server. So it seems better than my first try.
But I still can not clone any repozitory from another place.
When I try to add pub key + edit config for my windows PC with msysgit, then try
$ git clone [email protected]:project.git
cloning into project...
Fatal ERROR: unable to authenticate
Fatal: the remote end hung up unexpectedly
On other hand when try another linux, it still request for password.
# git clone [email protected]:project.git
Cloning into project...
[email protected]'s password:
Even when I provide password for git user:
fatal: 'project.git' does not appear to be a git repository
fatal: The remote end hung up unexpectedly
This was probably caused by broaken system account.
Now I really dont know what to do - should I create somehow .ssh/config on each client to make it work?
Now I am starting to be little bit annoyed and upset and I will probably remove all and try mercurial:-D
Except someone could help me:) Thank you.
如果你对这篇内容有疑问,欢迎到本站社区发帖提问 参与讨论,获取更多帮助,或者扫码二维码加入 Web 技术交流群。
绑定邮箱获取回复消息
由于您还没有绑定你的真实邮箱,如果其他用户或者作者回复了您的评论,将不能在第一时间通知您!
发布评论
评论(3)
是的,这就是问题...我也面临着同样的问题..我使用 puttygen ssh2-rsa 格式创建了公钥,gitolite 不接受这一点。您需要转换为 openssh
现在使用这个转换后的公钥
Yes thats the problem... me too faced the same.. i created the public key using puttygen ssh2-rsa format gitolite does not accept this. You need to convert to openssh
Now use this converted public key
没有“
keydata
”文件夹,只有“keydir
”和“conf
”(如前所述文档中)。如果您已在本地克隆了
gitolite-admin
存储库 (git clone gitolite@server:gitolite-admin
),您需要:keydir
存储库:username.pub
conf/gitolite.conf
的用户组之一中添加相同的用户名,gitolite-admin
存储库上有一个特殊的挂钩,它将新的公钥添加到~/.ssh/authorized_keys
文件中)。There is no '
keydata
' folder, only 'keydir
' and 'conf
' (as mentioned in the documentation).If you have cloned locally the
gitolite-admin
repo (git clone gitolite@server:gitolite-admin
), you need to:keydir
repo:username.pub
conf/gitolite.conf
gitolite-admin
repo which will add the new public key to the~/.ssh/authorized_keys
file).我解决了 msysgit 问题。
因为我总是有自定义的密钥名称,我不能说步骤 1 是否必要,我不会再尝试:) 现在我可以克隆/提交/推送 - 最后。
特别感谢 VonC 的耐心等待
I solved msysgit problem.
Because I always had custom name for key, I can not say if step 1 is neccessary and I won't try it again:) Now I can clone/commit/push - finally.
Special thanx to VonC for his patience