在提交代码review的时候可能会出现

Could not connect to gerrit.
Enter your gerrit username: xxxx
Trying again with ssh://xxxx@review.openstack.org:29418/openstack/oslo.messaging.git
<traceback object at 0xb6fe493c>
We don't know where your gerrit is. Please manually create a remote
named "gerrit" and try again.
Traceback (most recent call last):
File "/usr/bin/git-review", line 1196, in <module>
main()
File "/usr/bin/git-review", line 1110, in main
config['hostname'], config['port'], config['project'])
File "/usr/bin/git-review", line 489, in check_remote
add_remote(hostname, port, project, remote)
File "/usr/bin/git-review", line 344, in add_remote
raise Exception("Could not connect to gerrit at %s" % remote_url)
Exception: Could not connect to gerrit at ssh://xxxx@review.openstack.org:29418/openstack/oslo.messaging.git

could not review.openstack.org

手动添加节点gerrit节点

git remote add gerrit ssh://<username>@review.openstack.org:29418/openstack/nova.git

someone@someone-ThinkPad-E420:~/oslo.messaging$ git review
Problem running 'git remote update gerrit'
正在获取 gerrit
ssh: Could not resolve hostname review.openstack.org: Name or service not known
fatal: Could not read from remote repository.

Please make sure you have the correct access rights
and the repository exists.
error: 不能获取 gerrit
Problems encountered installing commit-msg hook
The following command failed with exit code 1
"scp :hooks/commit-msg .git/hooks/commit-msg"
-----------------------
.git/hooks/commit-msg: No such file or directory

ssh -vv -p 29418 name@review.openstack.org

打印调试信息

....

debug1: Next authentication method: publickey
debug1: Offering RSA public key: /home/someone/.ssh/id_rsa
debug2: we sent a publickey packet, wait for reply
debug1: Authentications that can continue: publickey
debug1: Trying private key: /home/someone/.ssh/id_dsa
debug1: Trying private key: /home/someone/.ssh/id_ecdsa
debug1: Trying private key: /home/someone/.ssh/id_ed25519
debug2: we did not send a packet, disable method
debug1: No more authentication methods to try.
Permission denied (publickey).

删除.ssh目录,重新生成私密钥

由于在国内OpenStack社区gerrit的29418端口被墙,所以大家可以使用https/http来完成git reiview。

  • 首先,需要登录review.openstack.org,然后在Settings -> HTTP Password里,生成一个HTTP密码,应该是一个大小写加数字的随机字符串。

  • 然后通过git remote set-url gerrit https://username:http-password@review.openstack.org/openstack/nova.git命令把ssh修改成https方式,当然也可以用http,经过我的实验都是可以的。别忘了把上面字符串中的用户名/密码改成你的gerrit用户名和上一步生成的HTTP密码。

引用至http://blog.csdn.net/agileclipse/article/details/38980419

git review出现的问题的更多相关文章

  1. git review & devops过程

    自己搭建的devops环境是gitlab/gerrit/jenkins 1. 首先自己checkout一个自己的代码分支,一般不要在master上做直接修改 2. 修改后git add file,   ...

  2. git review报错一例

    在线上修改代码,最后使用git review提交代码审核的时候出现报错如下:[wangshibo@115~]$ vim testfile           #修改代码[wangshibo@115~] ...

  3. (诊断)git review时出现fatal: ICLA contributor agreement requires current contact information.错误

    使用git review时出现错误: fatal: ICLA contributor agreement requires current contact information. Please re ...

  4. Git review :error: unpack failed: error Missing tree

    环境 git version 1.9.1 Gerrit Code Review (2.11.3) 1 2 现象 修改后调用 git review可以提交到Gerrit上,然后只要一用 git comm ...

  5. Git Review + Gerrit 安装及使用完成 Code-Review

    转载自:https://cloud.tencent.com/developer/article/1010615 1.Code Review 介绍 Code Review 代码评审是指在软件开发过程中, ...

  6. git 打补丁,即git review之后需要二次修改并提交代码

    假如代码已经push上去了,可是当review时,发现有地方需要修改,你可以继续在本地修改你的文件,之后git status查看修改的文件,然后git add修改的文件,此时不能直接git commi ...

  7. 2016福州大学软件工程 团队Git Review

    606Connected组: git地址:https://github.com/606notconnected/Beta.git 文件忽略:使用gitignore较正确 版本控制:只有1次commit ...

  8. 软件工程(DBSD2016) Git Review

    说明:任何问题请在评论区说明,会集中更新回复. 连连看组 源码: git clone https://git.coding.net/jx8zjs/llk.git 提交日志 一共有20次commit日志 ...

  9. git review filter的一些规则

    https://review.openstack.org/#/c/258797/ https://review.openstack.org/#/q/is:closed+(owner:yuntong)+ ...

随机推荐

  1. 解决selenium2在IE11上出错的问题,如Unable to get browser

    官方解决方案: https://github.com/SeleniumHQ/selenium/wiki/InternetExplorerDriver#required-configuration Re ...

  2. Redis3.0 配置文件说明

    背景: 以前有篇文章已经结果过了,现在复习一下,对Redis3.0进行说明: 参数说明: #redis.conf # Redis configuration file example. # ./red ...

  3. xcode8 info.plist文件中的各种权限。

    NSContactsUsageDescription -> 通讯录 NSMicrophoneUsageDescription -> 麦克风 NSPhotoLibraryUsageDescr ...

  4. Assertion failure in -[UITableView _configureCellForDisplay:forIndexPath:]

    今天遇到了Assertion failure in -[UITableView _configureCellForDisplay:forIndexPath:]这个错误,一直也没有百度,不料想却弄了一个 ...

  5. datepicker使用

    JqueryUI作为一个优秀的前端库,被广泛的应用在项目中.之前做的一个排班考勤系统,跟时间打交道较多,对时间控件做过一些对比,觉得jqueryUI里的这个datepicker更为实用,配置起来也简单 ...

  6. 跨域调用webapi

    web端跨域调用webapi   在做Web开发中,常常会遇到跨域的问题,到目前为止,已经有非常多的跨域解决方案. 通过自己的研究以及在网上看了一些大神的博客,写了一个Demo 首先新建一个webap ...

  7. WPF中Ribbon控件的使用

    这篇博客将分享如何在WPF程序中使用Ribbon控件.Ribbon可以很大的提高软件的便捷性. 上面截图使Outlook 2010的界面,在Home标签页中,将所属的Menu都平铺的布局,非常容易的可 ...

  8. EasyAR 开发教程系列1--小试牛刀

    大家好,我是Albert Lee(@Mars Studio),AR独立开发者.计算机视觉与人工智能研究者. AR 开发资源汇总(不断更新中):https://github.com/GeekLiB 微信 ...

  9. Java基础知识点3:集合类

    集合类是Java编程中经常会用到的一类常用类库,在这里将会对整个集合类进行介绍: Collection接口: Collection接口是所有集合类的根接口,代表了所有含有多个元素的集合,无论这个集合中 ...

  10. iOS导航控制器常用函数与navigationBar常用属性

    导航控制器常用函数触发时机 当视图控制器的View将要出现时触发 - (void)viewWillAppear:(BOOL)animated 当视图控制器的View已经出现时触发 - (void)vi ...