LDAP不工作的Gitolite
我对gitolite不熟悉。我试图用gitolite做一个非常简单的测试。我已经设置了名为“test_repo”的存储库。请注意,除了我在下面陈述的内容外,我没有修改任何其他内容。我可以在gitweb上看到这个回购协议。这是回购配置LDAP不工作的Gitolite,git,ldap,gitolite,Git,Ldap,Gitolite,我对gitolite不熟悉。我试图用gitolite做一个非常简单的测试。我已经设置了名为“test_repo”的存储库。请注意,除了我在下面陈述的内容外,我没有修改任何其他内容。我可以在gitweb上看到这个回购协议。这是回购配置 repo test_repo RW+ = @all 现在我想克隆这个回购协议。我有ldap访问服务器的权限。根据我对@all的理解,它应该允许我这样做 当我发布 git clone git@myserver:repositories/test_
repo test_repo
RW+ = @all
现在我想克隆这个回购协议。我有ldap访问服务器的权限。根据我对@all的理解,它应该允许我这样做
当我发布
git clone git@myserver:repositories/test_repo.git
#I know this is wrong. But I just wanted to test as the above did not work
或
是询问密码。我遵循了这个指南,它没有为git用户设置密码
当我发布
git clone git@myserver:repositories/test_repo.git
#I know this is wrong. But I just wanted to test as the above did not work
git克隆myname@myserver:test_repo.git
我得到以下错误
fatal: 'test_repo.git' does not appear to be a git repository
fatal: Could not read from remote repository.
Please make sure you have the correct access rights
and the repository exists.
我还尝试克隆默认的repo“test_repo.git”。但我也犯了同样的错误
我也累了
git clone myname@myserver:/home/git/repositories/testing.git
那么克隆就开始起作用了。但是当我做了gitpush-uoriginmaster
之后,我得到了一些修改过的文件
error: insufficient permission for adding an object to repository database ./objects
fatal: failed to write object
error: unpack failed: unpack-objects abnormal exit
! [remote rejected] master -> master (n/a (unpacker error))
注意:我没有在conf文件中添加任何用户
感谢您的帮助 试试看
sshgit@hostname-或ip
这不应该问密码;它可以询问密码短语。这还将发出您有权访问的存储库列表
顺便说一句-username@localhost在git中,克隆命令是大错特错的
git clone myname@myserver:/home/git/repositories/testing.git
- 完全绕过了gitolite,它不叫
- 使用错误的帐户“myname”,该帐户无权读取git帐户文件夹
git clone git@myserver:test_repo.git
or
git clone git@myserver/test_repo.git
您不应该指定“repositories”文件夹(gitolite知道repo应该在哪里)
这就假定ssh-Tvvvgit@myserver
有效(即不询问密码)。首先让ssh工作,然后重试
git克隆
正如我在评论中所说,LDAP和ssh都是身份验证机制,因此您可以使用其中一种,而不是两种:
- Https+LDAP+gitolite:
- 或者SSH+gitolite
如果ssh工作,但克隆不工作,那么您需要查看gitolite日志,位于~git/.gitolite/logs
我在日志中找不到任何有用的东西。此外,我对日志文件做了tail-f
。当我尝试克隆时,它甚至没有更新
这意味着问题在ssh级别,没有正确调用gitolite:这是在~git/.ssh/authorized_keys
中,如果您直接在其中手动添加ssh密钥,则会发生,而不是通过gitolite admin
repo的keys
文件夹添加,并将该repo推回到gitolite服务器(这会触发所述~git/.ssh/authorized_keys文件的更新)
我想这可能就是原因。我不知道刚才发生了什么事。我甚至可以在管理服务器中克隆gitolite admin
(这在前面已经起作用了)。
我会重新安装所有东西(因为我想我现在把配置文件搞砸了)
我累了sshgit@ip
。奇怪的是,如果我这么做了git@localhost当你的克隆url应该是“git clone”时,它会显示你的建议user@hostname:repo.git“另一件事-ip和名称之间可能不匹配。尝试清理/etc/hosts。使用正确的dns服务器等;检查~/.ssh/config文件。粘贴可能位于stackoverflowgit克隆上myname@myserver:test_repo.git不工作。在postssh-Tvvv中更新了此操作的输出git@myserver询问密码请注意,我尝试登录的客户端不是管理系统。另外,我还没有添加这个系统的密钥。我不想添加ssh,因为这意味着每个人都必须这样做。我希望ldap进行身份验证,以便测试我添加的密钥。因此sshgit@myserver
正在工作。但是当我使用:时,它会显示与以前相同的错误。当我使用\时,它显示致命存储库不存在
@knightrider您可以使用我在中说明的apache+LDAP(+gitolite)或ssh+gitolite。但不是ssh+LDAP+gitolite。ssh进行身份验证。或LDAP身份验证。不是两者都有。因此,在使用ssh url克隆repo时,始终使用“git
”,而不是“user
”。