Git:本地克隆gitosis管理员回购 [英] Git: Cloning gitosis admin repo locally
问题描述
我使用以下指南在我的ubuntu 10.04服务器上设置了gitosis的git repo: 它可以正常工作,可以将配置克隆到我的ubuntu 10.10桌面计算机上,并在那里提交更改。 好的,但我在服务器上完成了大部分实际编码。所以我需要在本地克隆配置/ gitosis-admin.git回购和其他回购协议。 git clone --local file:///home/git/repositories/gitosis-admin.git give me: 我将服务器用户添加到group git得到: 然后我试图在服务器上创建一个公钥,并将其添加到密钥admin repo中,在配置中将用户名(用户名和用户名@(主机名))都添加到: 当我回到桌面时,检查gitosis-admin回购,gitosis.conf列出: 但在服务器上,如果我根目录到/home/git/repositories/gitosis-admin.git/和cat gitosis。 conf,它列出 我无法理解这一点,我该如何设置它以使其按照我想要的方式工作。在这一切背后,有一些小白鼠咳嗽的可能性很大,但我花了5个小时试图让它现在起作用,并花了我2分钟来建立一个svn回购站。所以我越来越不耐烦了。 谢谢 <您需要将服务器上用户的ssh公钥添加到gitosis中,或者将ssh私钥从桌面复制到服务器上的用户并使用它。 对不起,我有点撇清了这个问题。你是如何安装gitosis的?我记得在安装过程中存在一个常见问题,gitosis-admin repo中的必需钩子未设置为可执行。因此,它在推送时从未更新配置。 您也应该只能通过SSH访问通过gitosis托管的repos,而不能通过本地文件系统访问,但似乎已经算出这部分了。 另外,如果你不知道,gitosis是维护和不赞成 gitolite 。 I set up a git repo with gitosis on my ubuntu 10.04 server using the following guide:
http://scie.nti.st/2007/11/14/hosting-git-repositories-the-easy-and-secure-way It works fine and dandy, I can clone the configuration to my ubuntu 10.10 desktop computer, and commit changes there. Thats Ok, but I do most of my actual coding on the server. So I will need to clone the configuration/gitosis-admin.git repo and the other repos locally. git clone --local file:///home/git/repositories/gitosis-admin.git gives me:
fatal: '/home/git/repositories/gitosis-admin.git' does not appear to be a git repository
fatal: The remote end hung up unexpectedly I added my server user to group git and got:
fatal: failed to open '/home/git/repositories/gitosis-admin.git/objects': Permission denied I then tried to make a public key on the server, and adding it to the keys admin repo, added the username, both as (user) and (user)@(hostname) in the configuration, to:
git clone git@localhost:gitosis-admin.git or git clone git@(hostname):gitosis-admin.git
both of which asks me for git@(hostname) password When I go back to my desktop, and check out the gitosis-admin repo, the gitosis.conf lists:
[gitosis] but on the server, if I root into /home/git/repositories/gitosis-admin.git/ and cat gitosis.conf, it lists
[gitosis] I can't get my head around this, how do I set this up to get it working the way I want to. The chances are great that there is some noob coughup on my part behind all this, but I've spent 5 hours trying to get this to work now, and it takes me 2 min to set up a svn repo. So I'm getting impatient .. Thanks Sorry I kinda skimmed the question at first. How did you install gitosis? I remember there being a common issue where during the install, a required hook in the gitosis-admin repo was not set to be executable. As a result it never updated the config when pushed to. Also you should only ever access repos hosted with gitosis through SSH and not through the local filesystem, but you seem to have figured this part out already. Additionally if you are not aware, gitosis is unmaintained and deprecated in favor of gitolite. 这篇关于Git:本地克隆gitosis管理员回购的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!
http://scie.nti.st/2007/11/14/hosting-git-repositories-the-easy-and-secure-way
fatal:'/ home / git /repositories/gitosis-admin.git'似乎不是git存储库
fatal:远程终端意外挂断
致命:未能打开'/home/git/repositories/gitosis-admin.git/objects':Permission denied
git clone git @ localhost:gitosis-admin.git或git clone git @(hostname):gitosis-admin.git
两者都要求我提供git @(hostname)密码
[gitosis]
[group gitosis-admin]
可写gitosis-admin
成员=(desktopUN)@(desktopHost名称)(serverUN)@(serverHostname)
[gitosis]
[group gitosis-admin]
可写gitosis-admin
成员=(desktopUN)@(desktopHostname )
[group gitosis-admin]
writable gitosis-admin
members = (desktopUN)@(desktopHostname) (serverUN)@(serverHostname)
[group gitosis-admin]
writable gitosis-admin
members = (desktopUN)@(desktopHostname) You need to either add the ssh public key of the user on server to gitosis or copy the ssh private key from the desktop to the user on the server and use it.