在提交代码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. python中如何避免中文是乱码

    这个问题是一个具有很强操作性的问题.我这里有一个经验总结,分享一下,供参考:首先,提倡使用utf-8编码方案,因为它跨平台不错.经验一:在开头声明: # -*- coding: utf-8 -*- 有 ...

  2. hibernate中HQL多对多的查询

    现有三张表 TLXPURCHASE.采购事项审批表,TLXPURCHASEACTIVITY.采购招标活动对应表,TLXACTIVITY.招标活动表,采购事项审批表和采购活动表是多对多关系.java中定 ...

  3. DIV+CSS 清除浮动方法总结

    DIV+CSS 清除浮动是页面布局中常见的问题,相信各位高手也都有自己的方法,今天在这里对常见的几种方法进行总结(PS:谈不上是原创,这里是我自己做的归纳总结,也是我自己内化的过程),希望对您能够有所 ...

  4. Android开发之---AIDL

    在Android开发中,有时会用到多进程通信,这时,可选的方案为: 1. Bundle    :四大组件之间的进程间通信 2. 文件共享   :适合无并发情景 3. Messager : 低并发的一对 ...

  5. flume+kafka+hbase+ELK

    一.架构方案如下图: 二.各个组件的安装方案如下: 1).zookeeper+kafka http://www.cnblogs.com/super-d2/p/4534323.html 2)hbase ...

  6. PullToRefreshListView相关

    PullToRefresh使用详解(四)--利用回调函数实现到底加载   链接

  7. 在Jenkins中获取GitHub对应Repository的Resource Code

    1):Install Jenkins 请看如下链接: https://wiki.jenkins-ci.org/display/JENKINS/Installing+Jenkins 2):Install ...

  8. UWP x:bind

    x:bind 作为win10 新特性,它好在哪?为什么要用它. 最近做UWP,对代码进行重构,对它有了一些了解. 先说优点: 1.性能高,内存小(相比传统的binding) 没图没真相,我先上2张图. ...

  9. iOS通知的使用

    注册:[[NSNotificationCenter defaultCenter] postNotificationName:@"changeColor" object:self]; ...

  10. Is It A Tree?[HDU1325][PKU1308]

    Is It A Tree? Time Limit: 2000/1000 MS (Java/Others)    Memory Limit: 65536/32768 K (Java/Others)Tot ...