As I said in the title, I am able to push to the gerrit, pull from the gerrit, but I am not able to cherry pick. When I asked the admin, he said I have all the rights to cherry pick, but I get the error as:
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://[email protected]:29418/myapp refs/changes/24/5324/2 && git cherry-pick FETCH_HEAD
Permission denied (publickey).
fatal: The remote end hung up unexpectedly
My application runs on Ubuntu 12.04 on a VirtualBox instance. All my peers are able to cherry-pick, and I find the issue is only with my machine, and that too with cherry-pick by FETCH. What might be the issue? What do you guys suggest? What information other than this, do you need?
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://[email protected]:29418/myapp refs/changes/96/5396/3 && git cherry-pick FETCH_HEAD
Permission denied (publickey).
fatal: The remote end hung up unexpectedly
As requested by RasmusØstergaardKjærVoss, I have included below the SSH Config file. Let me know if there's something to be changed.
praveen@praveen-vbox:~/work/myapp$ cat ~/.ssh/config
Host gerrit
HostName my.appdomain.com
Port 29418
User praveen
IdentityFile ~/.ssh/praveen_private
The ~/.ssh/, to my understanding git fetch ssh://[email protected]:29418/ will use the id_rsa key and not the ~/.ssh/praveen_private.
Backup your ~/.ssh folder Then try and create a copy of ~/.ssh/praveen_private named ~/.ssh/id_rsa If it is an rsa key otherwise copy it to ~/.ssh/id_dsa
Cheers
If you love us? You can donate to us via Paypal or buy me a coffee so we can maintain and grow! Thank you!
Donate Us With