正如我在标题中所说,我能够推动细菌,从细菌中拉出来,但我无法挑选。当我问管理员时,他说我拥有樱桃选择的所有权利,但我收到的错误是:
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 上运行。我的所有同行都可以cherry-pick
,我发现问题仅适用于我的机器,cherry-pick
也适用于 FETCH
。可能是什么问题?你们有什么建议?你还需要除此之外的哪些信息?
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
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
根据RasmusØstergaardKjærVoss的要求,我在SSH Config文件中包含了以下内容。如果有什么需要改变,请告诉我。
praveen@praveen-vbox:~/work/myapp$ cat ~/.ssh/config
Host gerrit
HostName my.appdomain.com
Port 29418
User praveen
IdentityFile ~/.ssh/praveen_private
答案 0 :(得分:1)
我的理解~/.ssh/
git fetch ssh://praveen@my.appdomain.com:29418/
将使用id_rsa
密钥,而不是~/.ssh/praveen_private
。
备份您的~/.ssh
文件夹然后尝试创建名为~/.ssh/praveen_private
的{{1}}副本如果是~/.ssh/id_rsa
密钥,则将其复制到rsa
干杯
答案 1 :(得分:0)
您在git或gerrit中的设置或gerrit部署的整体设置有问题。您可以运行git pull
,它基本上运行git fetch && git merge
。但是你无法运行从gerrit复制粘贴的git fetch
命令。查看git remote -v
的输出,并将其与您尝试运行的cherry-pick命令的git fetch
部分进行比较。您是否使用完全相同的服务器URL&港口?作为同一个用户?
最后,作为对Gerrit的连接测试,请尝试运行类似ssh username@gerrit_host -p 29418 gerrit ls-projects
的内容。这应该返回Gerrit服务器上的项目列表,这是解决任何设置问题的好方法。
答案 2 :(得分:0)
这给了我同样的错误:
ssh firstname.lastname@my.appdomain.com
更改为:
ssh firstname.lastname@gerrit.appdomain.co
为我解决了这个问题。