如何在 Ubuntu 10.04 上安装 git 守护进程
当我运行时,我在我和我上共享我的存储库
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: command not found
我缺少什么?
I'm sharing my repository on my
Linux nozim-desktop 2.6.32-24-generic #43-Ubuntu SMP Thu Sep 16 14:17:33 UTC 2010 i686 GNU/Linux
and I when I run:
sudo -u git git-daemon --base-path=/home/git/repositories/ --export-all
it says:
sudo: git-daemon: command not found
What I'm missing?
如果你对这篇内容有疑问,欢迎到本站社区发帖提问 参与讨论,获取更多帮助,或者扫码二维码加入 Web 技术交流群。
绑定邮箱获取回复消息
由于您还没有绑定你的真实邮箱,如果其他用户或者作者回复了您的评论,将不能在第一时间通知您!
发布评论
评论(3)
在我的 Ubuntu 10.04 系统上遇到同样的问题后,我了解到 git-daemon 只是安装在其他地方,并且操作方式与我按照设置指南所期望的方式不同。
在我的系统上,它位于
/us/lib/git-core/git-daemon
要使用它,请编辑文件
/etc/service/git-daemon/run/ 并修改参数以满足您的需要。
这是我的:
#!/bin/sh
执行2>&1
echo 'git-daemon 启动。'
执行 chpst -ugitdaemon
/usr/lib/git-core/git-daemon --verbose --base-path=/home/git/repositories
如果您希望所有存储库都公开可用,请添加
--export-all
,否则,请在以下目录中运行touch git-daemon-export-ok
您希望公开使用的存储库的/path/to/repositories/.git/
目录。进行更改后,运行 ps -A | grep 'git',然后运行
kill
以使用新配置重新加载git-daemon
。希望有帮助!
来源: http://sharplearningcurve.com/blog/post/2010/02/06/Chasing-The-CI-Grail-e28093-Setup-Gitosis-From-Scratch.aspx ( “更新 Git 守护进程配置”)
After encountering the same problem on my Ubuntu 10.04 system, I learned that git-daemon was just installed somewhere else and operated differently than the guide I followed on setting it up was expecting it to.
On my system, it was located at
/us/lib/git-core/git-daemon
To use it, edit the file
/etc/service/git-daemon/run/
and modify the parameters to suit your needs.Here is mine:
#!/bin/sh
exec 2>&1
echo 'git-daemon starting.'
exec chpst -ugitdaemon
/usr/lib/git-core/git-daemon --verbose --base-path=/home/git/repositories
If you want all of your repositories to be available publicly, add
--export-all
, otherwise, runtouch git-daemon-export-ok
within the/path/to/repositories/<repository-name>.git/
directory of the repositories you do want to be available publicly.After making your changes, run
ps -A | grep 'git'
and then run akill <process-id>
to reloadgit-daemon
with your new configuration.Hope that helps!
Source: http://sharplearningcurve.com/blog/post/2010/02/06/Chasing-The-CI-Grail-e28093-Setup-Gitosis-From-Scratch.aspx ("Update Git-Daemon Configuration")
在 Ubuntu 12.04 中,以下行开箱即用(在要共享的 Git 存储库中执行它):
要克隆共享存储库,请使用
请注意,主机名后面的
/
是必需的。In Ubuntu 12.04, the following line worked for me out of the box (execute it in the Git repository you want to share):
To clone the shared repository, use
Note that the
/
after the hostname is required.看看 https://help.ubuntu.com/community/Git#Making_available_public_cloning_of_the_projects
它解决了我的问题。
Take a look at https://help.ubuntu.com/community/Git#Making_available_public_cloning_of_the_projects
It solved my problem.