【问题标题】:How to install git daemon on Ubuntu 10.04如何在 Ubuntu 10.04 上安装 git 守护进程
【发布时间】:2011-04-01 12:06:56
【问题描述】:

我在我的

上共享我的存储库 Linux nozim-desktop 2.6.32-24-generic #43-Ubuntu SMP Thu Sep 16 14:17:33 UTC 2010 i686 GNU/Linux

我跑步时:

sudo -u git git-daemon --base-path=/home/git/repositories/ --export-all

上面写着:

sudo: git-daemon: 找不到命令

我错过了什么?

【问题讨论】:

    标签: ubuntu git-daemon


    【解决方案1】:

    在我的 Ubuntu 10.04 系统上遇到同样的问题后,我了解到 git-daemon 只是安装在其他地方,并且操作方式与我在设置它时所遵循的指南所期望的不同。

    在我的系统上,它位于/us/lib/git-core/git-daemon

    要使用它,请编辑文件/etc/service/git-daemon/run/ 并修改参数以满足您的需要。

    这是我的:

    #!/bin/sh
    exec 2>&1
    echo 'git-daemon starting.'
    exec chpst -ugitdaemon /usr/lib/git-core/git-daemon --verbose --base-path=/home/git/repositories

    如果您希望所有存储库都可以公开使用,请添加--export-all,否则,请在您希望公开使用的存储库的/path/to/repositories/<repository-name>.git/ 目录中运行touch git-daemon-export-ok

    进行更改后,运行 ps -A | grep 'git',然后运行 ​​kill <process-id> 以使用新配置重新加载 git-daemon

    希望有帮助!

    来源: http://sharplearningcurve.com/blog/post/2010/02/06/Chasing-The-CI-Grail-e28093-Setup-Gitosis-From-Scratch.aspx(“更新 Git-Daemon 配置”)

    【讨论】:

      【解决方案2】:

      在 Ubuntu 12.04 中,以下行开箱即用(在您要共享的 Git 存储库中执行):

      git daemon --export-all --base-path=$(pwd)
      

      要克隆共享存储库,请使用

      git clone git://HOSTNAME/ REPOSITORY_NAME
      # e.g., git clone git://my-machine/ test-project
      

      请注意,主机名后面的/是必需的。

      【讨论】:

        【解决方案3】:

        【讨论】:

        • 谢谢,我会尽快试试的:)
        猜你喜欢
        • 1970-01-01
        • 2013-08-25
        • 1970-01-01
        • 1970-01-01
        • 1970-01-01
        • 1970-01-01
        • 1970-01-01
        • 1970-01-01
        • 2013-06-24
        相关资源
        最近更新 更多