关于代码贡献,可以查看这篇文章,今天我们记录的是 爬墙与错误处理
-
gerrit爬墙
因为GFW问题,gerrit port29418被封,我们可以使用username/password方式,进行设置访问,设置如下:
git remote set-url gerrit https://username:http-password@review.openstack.org/openstack/keystone.git
这个命令我是在项目里面执行的,如果有多个项目貌似只要对开始的有用,其他的都是报no gerrit的错误
如果报错 没有gerrit,可以使用
git remote add gerrit http://zouyee:http-password@review.openstack.org/openstack/xxx,这样
就可以直接添加
其中,进入Setting->HTTP password,将上面代码中的username,http-password分别替换,即可
-
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
那么怎么解决这样一个不匹配的问题呢,继续往下面看 因为你报错的时候会给一个commit ID,我们通过下面的命名重置更改,返回到没有出错的时间点
git reset --hard COMMITID