测试Gerrit SSH链接

测试Gerrit SSH链接

Gerrit安装好以后,咱们须要只有将gerrit上的clone下来,才能进行修改提交,并进行review。git

gerrit支持两种方式下载代码:ssh和http。shell

使用ssh的链接操做以下:,gerrit网址url为:http://review.gerritsite.com/ssh

1.本地生成ssh key,并贴到gerrit上。

2.测试连接

公钥添加到gerrit上以后,就能够经过ssh命令来测试链接,gerrit的ssh默认端口号是29418;若是出现以下内容,表示链接成功。
$ ssh -p 29418 sshusername@review.gerritsite.com

    ****    Welcome to Gerrit Code Review    ****

    Hi John Doe, you have successfully connected over SSH.

    Unfortunately, interactive shells are disabled.
    To clone a hosted Git repository, use:

    git clone ssh://sshusername@review.gerritsite.com:29418/REPOSITORY_NAME.git

  Connection to hostname closed.

3.获取端口信息

经过curl命令,获取gerrit网站的ssh信息
$ curl http://review.gerritsite.com/ssh_info
review.gerritsite.com 29418
相关文章
相关标签/搜索