美文网首页
Upsource实现Intellij IDEA上的Code Re

Upsource实现Intellij IDEA上的Code Re

作者: 十毛tenmao | 来源:发表于2019-06-17 11:55 被阅读0次

Code Review很重要,但是大部分CR方案都要求在浏览器或其他工具上完成,而不能使用日常开发工具,比如Intellij IDEA。但是JetBrains推出的Upsource可以实现在Intellij IDEA上完成Code Review。

安装Upsource服务


下载&解压

https://www.jetbrains.com/upsource/download
下载后解压

启动

  • Windows
#启动
bin\upsource.bat start

#停止
bin\upsource.bat stop

#重启
bin\upsource.bat restart
  • Linux/Mac
#启动
bin/upsource.sh start

#停止
bin/upsource.sh stop

#重启
bin/upsource.sh restart
Starting Upsource...
* Configuring JetBrains Upsource 2018.2
* Made default base-url 'http://pc-20190609aqme/' from hostname 'pc-20190609aqme' and listen port '80'
* JetBrains Upsource 2018.2 runtime environment is successfully configured
* Loading logging configuration from D:\Program Files\upsource-2018.2.1291\lib\ext\log4j.xml
* Redirecting JetBrains Upsource 2018.2 logging to D:\Program Files\upsource-2018.2.1291\logs\internal\services\bundleProcess
* Configuring Service-Container[bundleProcess]
* Configuring Bundle Backend Service
* Configuring Configuration Wizard
* Starting Service-Container[bundleProcess]
* Starting Bundle Backend Service
* Starting Configuration Wizard
* JetBrains Upsource 2018.2 Configuration Wizard will be available on [http://pc-20190609aqme?wizard_token=CxDoorwSy6hFBdQ326pv] after start
Upsource is running

设置Upsource

启动成功后一般会自动弹出浏览器并打开链接http://pc-20190609aqme?wizard_token=CxDoorwSy6hFBdQ326pv。点击"Set up"后开始设置:

设置Upsource
  • 配置URL和端口


    URL和端口
  • 设置密码

  • 配置License

  • 配置完成后等待程序生效


    等待配置生效

设置项目Repository

Upsource启动完毕后,使用admin登录

  • 创建Project


    创建Project
  • 配置Project


    设置Project

Intellij IDEA客户端配置


IDEA使用Upsource Integration插件

  • 安装插件


    Upsource Integration
  • 使用插件
    插件安装成功后,在项目右下角有插件的标志(如下图)


    插件安装后
  • 点击插件标志后获取Upsource服务器权限


    IDEA获取访问Upsource权限

Code Review

  • 新增Comment


    新增Comment
  • 查看Comment及处理


    查看Comment及处理

常见问题

  • Test VCS connection failed. List remote refs failed: com.jcraft.jsch.JSchException: Error while loading an uploaded key 'the-key': invalid privatekey
    • 解决办法一: 增加-m pem选项
ssh-keygen -t rsa -b 2048 -m pem
- 解决办法二:如果key是PuTTY格式,则需要转换为OpenSSH格式
Open PuttyGen.

Click File | Load private key.

Go to Conversions | Export OpenSSH and export your private key.

Paste the converted private key into Upsource.

参考

相关文章

网友评论

      本文标题:Upsource实现Intellij IDEA上的Code Re

      本文链接:https://www.haomeiwen.com/subject/pqpgfctx.html