在提交代码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. vux 表单提交数据 返回后页面跳转

    ps:仅作参考

  2. 3.使用OGG进程进行初始化数据

    开始初始化数据的时候要满足下面的条件: 1.disable掉目标段表的外键约束 2.disable掉目标端表的触发器 3.删除目标段表的索引,加快初始化速度 4.目标端表结构创建完成 源端配置初始化抽 ...

  3. MVC 好记星不如烂笔头之 ---> 全局异常捕获以及ACTION捕获

    public class BaseController : Controller { /// <summary> /// Called after the action method is ...

  4. 在SQL SERVER中实现RSA加解密函数(第二版)

    /*************************************************** 作者:herowang(让你望见影子的墙) 日期:2010.1.5 注: 转载请保留此信息 更 ...

  5. [leetcode] 题型整理之排列组合

    一般用dfs来做 最简单的一种: 17. Letter Combinations of a Phone Number Given a digit string, return all possible ...

  6. 转-临界区对象TCriticalSection与TRTLCriticalSection的区别

    TRTLCriticalSection是一个结构体,在windows单元中定义: 是InitializeCriticalSection, EnterCriticalSection, LeaveCrit ...

  7. XE2 泛型练习1

    要引用单元 System.Generics.Collections implementation {$R *.dfm}var i: Integer; str: string; procedure TF ...

  8. Java -> 把Excel表格中的数据写入数据库与从数据库中读出到本地 (未完善)

    写入:没有关闭流,容错并不完善. private void insertFile(HttpServletRequest request, HttpServletResponse response) t ...

  9. Redis 基本操作

    参考网址:http://doc.redisfans.com/            redis 在操作的时候,不区分大小写(包括php) Key(键) DEL key [key ...] 删除给定的一 ...

  10. 你应该在开始API开发之前知道的事(下)(翻译)

    放了十多天,一直在玩没写,今天终于要把坑填完了.有部分没翻,主要是一般都用不上的,有兴趣的朋友可以自己翻下. 上篇地址 :http://www.cnblogs.com/Scohura/p/357360 ...