CentOS 7中安装搭建Git服务器Gitolite(2)

输出如下内容:

Initialized empty Git repository in /home/git/repositories/gitolite-admin.git/ Initialized empty Git repository in /home/git/repositories/testing.git/ WARNING: /home/git/.ssh missing; creating a new one (this is normal on a brand new install) WARNING: /home/git/.ssh/authorized_keys missing; creating a new one (this is normal on a brand new install)

git@server1:~_008

如果您收到以上输出,恭喜! Gitolite已经成功安装。

你可能会看到一些警告。 没事。 它们在新安装中是正常的。

测试 Gitolite

现在,让我们来测试Gitolite是否正常工作。 切换到您创建SSH密钥的帐户。 在我的情况下,我从我的root帐户创建了SSH密钥。

[git@server1 ~]$ su - root

尝试从新安装的Gitolite服务器克隆gitolite-admin存储库。

要这样做,请运行:

[root@server1 ~]# git clone git@192.168.1.150:gitolite-admin

您将被要求输入root用户密码。 因为我们已经交换了SSH密钥。

输出如下内容

Cloning into 'gitolite-admin'... The authenticity of host '192.168.1.150 (192.168.1.150)' can't be established. ECDSA key fingerprint is ed:6b:ab:6d:b8:58:d0:f2:77:67:62:ef:90:51:26:ad. Are you sure you want to continue connecting (yes/no)? yes Warning: Permanently added '192.168.1.150' (ECDSA) to the list of known hosts. remote: Counting objects: 6, done. remote: Compressing objects: 100% (4/4), done. remote: Total 6 (delta 0), reused 0 (delta 0) Receiving objects: 100% (6/6), done.

root@server1:~_009

使用命令检查gitolite-admin存储库内容:

[root@server1 ~]# ls

[root@server1 ~]# ls gitolite-admin/

OK。 Gitolite正在工作!

内容版权声明:除非注明,否则皆为本站原创文章。

转载注明出处:https://www.heiqu.com/88d3aea3443fd52702c1fa48a93b96bf.html