gitolite-admin克隆问题 [英] gitolite-admin clone issue

查看:159
本文介绍了gitolite-admin克隆问题的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!

问题描述

我在克隆gitolite-admin存储库时遇到了一个问题。
我遵循此 http://sitaramc.github.com/gitolite/install



我运行了 ssh-keygen -t rsa scp〜/ .ssh / id_rsa.pub morten @ ubuntu-server:/tmp/morten.pub



authorized_keys在服务器上看起来像这样:

 #gitolite start 
command =/ home / morten / gitolite / src / gitolite-shell morten,no-port-forwarding,no-X11-forwarding,no-agent-forward
#gitolite end

哪个AFAIK可以。



当我运行 git clone morten @ ubuntu-server时:gitolite-admin 在我的客户端,我得到

 致命:'gitolite-admin'似乎不是git repository 
fatal:远端意外挂了

我不知道我错过了什么!

解决方案

使用 mor



但是,考虑到您当前的〜morten / .ssh / authorized_keys content:



而不是 / home / morten / gitolite / src / gitolite-shell morten |,你应该有 / home / morten / gitolite / bin / gitolite-shell morten



意思是: gitolite-shell 应该在你的 $ PATH 中,并且它应该在执行后创建的bin目录中:
$ b

 $ {github} / install-to$ {gtl} / bin

(请参阅 安装Gitolite




$ b


  • github 您克隆的路径 https://github.com/ sitaramc / gitolite

  • gtl 您要安装gitolite的路径(在y我们的情况,例如 / home / morten / gitolite



然后,更容易保存你的 authorized_keys .gitolite.rc 文件,并重新执行初始化过程:

  gitolite setup -pk$ {HOME} /。ssh / gitoliteadm.pub

(前提是您创建了公钥和私钥,将其命名为 gitoliteadm ',简单:

  ssh-keygen -t rsa -f$ {H} /。ssh / morten-CGitolite Admin访问(而不是交互式)-q -P



请注意,我保留'ssh'帐户名称( morten )不同于gitolite服务器帐户( gitoliteadm

您仍然可以克隆 git clone morten @ ubuntu-server:gitolite-admin (因为所有的ssh文件都在〜morten / .ssh 中),但是你可以使用 gitoliteadm 的私钥/ code>,促使gitolite通过一个名为 gitoliteadm 的gitolite账户来访问它的回购。 ,如果您更改gitolite服务器的物理用户帐户,那么逻辑帐户' gitoliteadm '(指的是角色,而不是指个人或资源)。


I am going nuts with a problem cloning the gitolite-admin repository. I have followed this http://sitaramc.github.com/gitolite/install.html#migr and it went perfectly.

I ran ssh-keygen -t rsa and scp ~/.ssh/id_rsa.pub morten@ubuntu-server:/tmp/morten.pub

authorized_keys on the server looks like this:

# gitolite start
command="/home/morten/gitolite/src/gitolite-shell morten",no-port-forwarding,no-X11-forwarding,no-agent-forward$
# gitolite end

Which AFAIK is okay.

When I run git clone morten@ubuntu-server:gitolite-admin on my client, I get

fatal: 'gitolite-admin' does not appear to be a git repository
fatal: The remote end hung up unexpectedly

I have no idea what I missed!

解决方案

Using morten account is perfectly fine.

However, your installation is strange, considering your current ~morten/.ssh/authorized_keys content:

Instead of /home/morten/gitolite/src/gitolite-shell morten|, you should have /home/morten/gitolite/bin/gitolite-shell morten

That means: gitolite-shell should be in your $PATH, and it should be in a bin directory, created after executing:

"${github}/install" -to "${gtl}/bin"

(See option 3 of the "actual install" section of "Installing Gitolite")

with:

  • github the path where you have cloned https://github.com/sitaramc/gitolite
  • gtl the path where you want to install gitolite (in your case, for instance, /home/morten/gitolite)

Then, it is easier to save your authorized_keys and .gitolite.rc file, and re-do the initialization process:

gitolite setup -pk "${HOME}/.ssh/gitoliteadm.pub"

(provided you created your public and private key, naming it 'gitoliteadm', with a simple:

ssh-keygen -t rsa -f "${H}/.ssh/morten" -C "Gitolite Admin access (not interactive)" -q -P ""

)

Note that I keep the 'ssh' account name (morten) different than the gitolite server account (gitoliteadm) on purpose.

You will still clone with git clone morten@ubuntu-server:gitolite-admin (because all ssh files are in ~morten/.ssh), but you will do so with the private/public key of gitoliteadm, prompting gitolite to access its repo with a gitolite "account" named "gitoliteadm".

That way, if you change physical user account for your gitolite server, the "logical" account 'gitoliteadm' (referring to a role, not to a person or resource).

这篇关于gitolite-admin克隆问题的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!

查看全文
登录 关闭
扫码关注1秒登录
发送“验证码”获取 | 15天全站免登陆