git review出现的问题

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

Could not connect to gerrit.
Enter your gerrit username: xxxx
Trying again with ssh://[email protected]: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://[email protected]: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 [email protected]

打印调试信息

....

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目录,重新生成私密钥

 

你可能感兴趣的:(view)