Phabricator配置

来源:互联网 发布:测试网络连通性的命令 编辑:程序博客网 时间:2024/05/23 21:48

Phabricator配置

Phabricator是一款代码review的工具,可以支持团队成员间的code review,以提高并保证代码的质量。

phabricator地址是:http://115.29.37.1:9999/

  • Phabricator配置
    • 安装依赖
    • 安装arcanist
    • 安全认证

Phabricator配置

安装依赖

安装php

安装git

安装arcanist

arcanist是phabricator的客户端工具,开发人员利用arc命令把修改的代码提交至phabricator服务器进行代码的review。

  1. 创建目录,如somewhere
  2. 进入该目录,如cd somewhere
  3. 在该目录下,执行
    1. git clone https://github.com/phacility/libphutil.git
    2. git clone https://github.com/phacility/arcanist.git
  4. 将arc命令加入环境变量或path
    1. export PATH="$PATH:/somewhere/arcanist/bin/"

详细安装,请参见下面的链接:

Windows用户安装

Linux用户安装

Mac用户安装

安全认证

在第一次使用arc命令的时候,系统需要用户与服务器之间做一个安全的验证。

首先clone项目代码,可使用测试项目testing,该项目下已添加.arcconfig文件,执行:

git clone git@1150.290.370.100:testing

在项目代码(前提是该项目目录下已存在.arcconfig文件)目录下,执行

arc install-certificate

系统显示:

 

Installing certificatefor 'http://115.209.307.101:9999/api/'...
Trying to connect to server...
Connection OK!
LOGIN TO PHABRICATOR
Open this page in your browser and login to Phabricatorif necessary:
    http://115.209.307.101:9999/conduit/token/
Then pastethe token on that page below.
    Paste token from that page:

 

用户在浏览器里访问http://115.209.307.101:9999/conduit/token/,登录phabricator,

然后将界面显示的token值复制后,在命令行下输入,然后回车。

系统显示

 

Downloading authentication certificate...
Installing certificatefor '用户名'...
Writing ~/.arcrc...
 SUCCESS!  Certificate installed.

 

这样,认证就成功了。

随后可以进行代码文件的改动,commit之后,执行arc diff就可提交review,review批准后,执行arc land将代码push到master上。

0 0
原创粉丝点击