我试着按照这个文件…
https://help.ubuntu.com/community/Git
…但不幸的是,“initialKeyFileName”步骤没有解释。
它在顶部说:
- 你已经有了一个公用的ssh密钥在你的本地机器上,你可以用它来初始化版本库。 没有? 看这里
链接的文章是伟大的,应该没有问题,遵循它。
Sparkle Share – Ubuntu 10.04中的Git服务器安装
我从一个空的Ubuntu服务器10.04开始安装openssh。 我假设你可以从http://mydomain.com访问你的服务器
安装Git
aptitude build-dep git-core apt-get install git-core git --version #(not necessary just to insure that is installed)
添加用户git
adduser --disabled-password git git init --bare /home/git/MyProject #(your projects folder, named as you like)
创build一个密钥文件,以便无需密码login
mkdir /home/git/.ssh touch /home/git/.ssh/authorized_keys
编辑文件/home/git/.ssh/authorized_keys并粘贴您的密钥。 您可以在客户端find您的项目文件为.txt文件。
pico /home/git/.ssh/authorized_keys
更改文件的所有者和权限
chmod 700 /home/git/.ssh chmod 600 /home/git/.ssh/authorized_keys chown -R git:git /home/git
在客户端添加你的服务器
mydomain.com , /home/git/MyProject
我在这里创build了一个关于在Debian上安装git的文档,我认为你可以在Ubuntu上遵循相同的步骤