正如我在标题中所说,我可以推到 gerrit,从 gerrit 中拉出,但我不能樱桃采摘。当我问管理员时,他说我拥有挑选樱桃的所有权利,但我得到的错误是:
错误信息
Permission denied (publickey).
fatal: The remote end hung up unexpectedly
当我尝试拉动和变基时
praveen@praveen-vbox:~/work/myapp$ git pull --rebase
remote: Counting objects: 8888, done
remote: Finding sources: 100% (615/615)
remote: Total 615 (delta 416), reused 536 (delta 416)
Receiving objects: 100% (615/615), 267.47 KiB, done.
Resolving deltas: 100% (416/416), completed with 163 local objects.
From gerrit:myapp
b7b8734..f5a782b master -> origin/master
First, rewinding head to replay your work on top of it...
Fast-forwarded master to f5a782b97079491e25638c9a752794e3af0a7543.
当我尝试检查状态时
praveen@praveen-vbox:~/work/myapp$ git status
# On branch master
nothing to commit (working directory clean)
当我尝试提交时
praveen@praveen-vbox:~/work/myapp$ git commit
[master 4c41a43] Minor fixes
2 files changed, 2 insertions(+), 2 deletions(-)
当我尝试推送时
praveen@praveen-vbox:~/work/myapp$ git push gerrit:myapp HEAD:refs/for/master
Counting objects: 20, done.
Compressing objects: 100% (10/10), done.
Writing objects: 100% (10/10), 896 bytes, done.
Total 10 (delta 9), reused 0 (delta 0)
remote: Resolving deltas: 100% (9/9)
remote: Processing changes: updated: 1, done
To gerrit:myapp
* [new branch] HEAD -> refs/for/master
当我尝试樱桃采摘
praveen@praveen-vbox:~/work/myapp$ git fetch ssh://praveen@my.appdomain.com:29418/myapp refs/changes/24/5324/2 && git cherry-pick FETCH_HEAD
Permission denied (publickey).
fatal: The remote end hung up unexpectedly
概括
我的应用程序在VirtualBox实例上的Ubuntu 12.04上运行。我所有的同龄人都能够,而且我发现问题只出在我的机器上,而且by也是如此。可能是什么问题?你们有什么建议?除了这些,你还需要什么信息?cherry-pick
cherry-pick
FETCH
更新#1
配置
praveen@praveen-vbox:~/work/myapp$ git config --list
alias.s=status
alias.c=commit
alias.ca=commit --amend
alias.co=checkout
alias.dc=diff --color
alias.l=log --oneline
alias.pr=pull --rebase
alias.aa=add .
user.email=[removed] /* Removed before posting to SO. Email matches. */
core.editor=vim
color.ui=always
remote.origin.fetch=+refs/heads/*:refs/remotes/origin/*
core.repositoryformatversion=0
core.filemode=true
core.bare=false
core.logallrefupdates=true
remote.origin.fetch=+refs/heads/*:refs/remotes/origin/*
remote.origin.url=gerrit:myapp.git
branch.master.remote=origin
branch.master.merge=refs/heads/master
对于Titas的查询,结果是:
praveen@praveen-vbox:~/work/myapp$ git fetch gerrit refs/changes/96/5396/3
fatal: 'gerrit' does not appear to be a git repository
fatal: The remote end hung up unexpectedly
另外,当我正常执行时,结果如下:
praveen@praveen-vbox:~/work/myapp$ git fetch ssh://praveen@my.appdomain.com:29418/myapp refs/changes/96/5396/3 && git cherry-pick FETCH_HEAD
Permission denied (publickey).
fatal: The remote end hung up unexpectedly
更新 #2:SSH 配置
根据RasmusØstergaardKjærVoss的要求,我已将 SSH 配置文件包含在下面。让我知道是否有什么要改变的。
praveen@praveen-vbox:~/work/myapp$ cat ~/.ssh/config
Host gerrit
HostName my.appdomain.com
Port 29418
User praveen
IdentityFile ~/.ssh/praveen_private