我正在尝试在我的服务器上设置gitolite(Macos服务器).
我按照此处的INSTALL文档中的说明进行操作:http: //sitaramc.github.com/gitolite/doc/1-INSTALL.html
我安装了root方法.
我得到了一切设置(ssh pubkey身份验证和默认的gitolite设置)
$ssh git@server info
hello admin, the gitolite version here is v1.5.9.1-27-gb97115f
the gitolite config gives you the following access:
R W gitolite-admin
@R_ @W_ testing
Run Code Online (Sandbox Code Playgroud)
根据安装说明,我应该能够检查存储库.
但是当我尝试克隆gitolite-admin存储库时,我收到一个错误:
$ git clone git@server:gitolite-admin
Cloning into gitolite-admin...
Assertion failed: (argv0_path), function system_path, file exec_cmd.c, line 27.
error: git-shell died of signal 6
fatal: The remote end hung up unexpectedly
Run Code Online (Sandbox Code Playgroud)
我得到了最新的git版本的gitolite和git v.1.7.3.4
有谁能够帮我?
编辑1:在错误消息之前添加了git clone命令
似乎正确修复此错误是添加
$ENV{GIT_EXEC_PATH} = "/usr/libexec/git-core";
Run Code Online (Sandbox Code Playgroud)
到你的.gitolite.rc文件.
该skipper3k OP 报告的问题与RUNTIME_PREFIX在Git中,有点类似" git pull破 "的问题:
我不确定是否
RUNTIME_PREFIX为你定义.但是在注入时Makefile,我确实注意到前缀默认为$(HOME).我怀疑这可能是你问题的原因.简单的答案就是把它放进去
~/.bashrc:
export GIT_EXEC_PATH=/opt/local/libexec/git-core
Run Code Online (Sandbox Code Playgroud)
如果你想了解更多有关正在发生的事情,你可能需要使用
port -d upgrade -f git-core(或类似的)重新编译git并仔细查看构建日志以查看正在设置前缀的位置.
顺便说一句,port cat git-core显示了大量使用${prefix}.
原始答案:
首先,您是否获得了最新的gitolite版本?
在https://github.com/sitaramc/gitolite/,你需要考虑' pu'分支.
然后是安装文档.
"安装"包括以下选项:
- 将源保持在任何位置并使用完整路径来运行gitolite命令.
- 将源保存在任何地方,只需将gitolite程序符号链接到$ PATH上的某个目录.
- 将源复制到某处并使用该路径运行gitolite命令.
您可以通过3种不同的方式运行'install'命令:
# option 1
gitolite/install
# option 2
gitolite/install -ln
# defaults to $HOME/bin, or use a specific directory:
gitolite/install -ln /usr/local/bin
# option 3
gitolite/install -to /usr/local/gitolite/bin
Run Code Online (Sandbox Code Playgroud)
对于gitolite V2的老答案:其次,我更喜欢 " 从客户端方法 " 方法:
此方法的优点是它会强制您在尝试安装之前解决ssh pubkey问题.
如果您有专用的用户ID,它最有效,
- 一个在服务器上安装gitolite,
- 一个在客户端管理它.
缺点是管理员用户最终得到两个密钥
- 一个用于shell访问(他开始使用)和
- 一个用于gitolite访问(如果需要脚本创建).
所以我喜欢~/.ssh/config使用两组不同的参数创建一个文件:
host gitolite
user git
hostname server
identityfile ~/.ssh/git
host gitadmin
user git
hostname server
identityfile ~/.ssh/id_rsa (myaccount public key)
Run Code Online (Sandbox Code Playgroud)
该gitolite管理员只对首次公开SSH密钥可见:
C:\HOMEWARE\git>ssh gitolite
hello git, the gitolite version here is v1.5.9-25-ga10287a
the gitolite config gives you the following access:
R W gitolite-admin
@R_ @W_ testing
Connection to server closed.
Run Code Online (Sandbox Code Playgroud)
用我的帐户:
C:\HOMEWARE\git>ssh gitadmin
hello myaccount, the gitolite version here is v1.5.9-25-ga10287a
the gitolite config gives you the following access:
@R_ @W_ testing
Connection to mccprdgit10 closed.
Run Code Online (Sandbox Code Playgroud)
所以:
C:\HOMEWARE\git>git clone gitolite:gitolite-admin
Cloning into gitolite-admin...
remote: Counting objects: 16, done.
remote: Compressing objects: 100% (13/13), done.
remote: Total 16 (delta 2), reused 0 (delta 0)
Receiving objects: 100% (16/16), done.
Resolving deltas: 100% (2/2), done.
Run Code Online (Sandbox Code Playgroud)
如果不知道您的安装到底出了什么问题,那么了解您在服务器上安装 gitolite 时执行的命令会很有用。
我建议您阅读这两个链接,它们在我安装 gitolite 时对我很有帮助:
http://kris.me.uk/2010/09/30/git-repository-server-gitolite.html(特别是这个)
http://progit.org/book/ch4-8.html
| 归档时间: |
|
| 查看次数: |
18891 次 |
| 最近记录: |