您的位置:首页 > 运维架构

openstack gerrit的日常

2015-10-20 19:22 183 查看
# Openstack社区Gerrit 代码提交教程

[关于代码贡献,可以查看这篇文章](http://blog.csdn.net/agileclipse/article/details/17405035),今天我们记录的是

爬墙与错误处理

* #gerrit爬墙

---

因为GFW问题,gerrit port29418被封,我们可以使用username/password方式,进行设置访问,设置如下:

`git remote set-url gerrit https://username:http-password@review.openstack.org/openstack/keystone.git`
这个命令我是在项目里面执行的,如果有多个项目貌似只要对开始的有用,其他的都是报no gerrit的错误

其中,进入Setting->HTTP password,将上面代码中的username,http-password分别替换,即可

[其他提交代码方式详见链接](http://m.blog.csdn.net/blog/agileclipse/38980419)

* #gerrit设置

---

配置gitreview

`git config --global gitreview.username USERNAME`

`git config --global gitreview.email=EMAIL`

或者设置下面的

`git config --global user.name USERNAME`

`git config --global user.email EMAIL`

其中USERNAME、EMAIL填写你自己的账号信息即可,如果出现以下错误

`commiter email address xxx does not match your user account`

那就是你的账号配置有问题,可以通过以下命令查看配置

`git config -l`

[那么怎么解决这样一个不匹配的问题呢](http://tanglei528.blog.163.com/blog/static/43353399201512625749189/),继续往下面看

因为你报错的时候会给一个commit ID,我们通过下面的命名重置更改,返回到没有出错的时间点

`git reset --hard COMMITID`

[当然你也可以通过`git log`查看你需要返回的时间点](http://www.douban.com/note/189603387/)

查看原文:http://www.zoues.com/index.php/2015/10/20/openstack-gerrit-daily/
内容来自用户分享和网络整理,不保证内容的准确性,如有侵权内容,可联系管理员处理 点击这里给我发消息
标签: