Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Permission denied (publickey) #29

Open
fstefanov opened this issue May 31, 2019 · 3 comments
Open

Permission denied (publickey) #29

fstefanov opened this issue May 31, 2019 · 3 comments

Comments

@fstefanov
Copy link

Hello, looks like I need some help with initial configuration :)

What ssh key is used by default?
And where these configs are stored?

gerrit config -a
name = default
host = [ 'localhost' ]
user = [ 'jenkins' ]
port = [ '29418' ]
gerrit clone playground

Cloning project playground from default config into folder playground...
Cloning into 'playground'...
Permission denied (publickey).
fatal: Could not read from remote repository.

Please make sure you have the correct access rights
and the repository exists.
(node:70212) [DEP0097] DeprecationWarning: Using a domain property in MakeCallback is deprecated. Use the async_context variant of MakeCallback or the AsyncResource class instead.
gerrit ERROR There was an error running a git command
gerrit ERROR   command: 'clone' '--progress' 'ssh://[ 'jenkins' ]@[ 'localhost' ]:29418/playground.git' 'playground'
gerrit ERROR   output:
gerrit ERROR   error: Cloning into 'playground'...
Permission denied (publickey).
fatal: Could not read from remote repository.

Please make sure you have the correct access rights
and the repository exists.
gerrit ERROR   code: 128
cat ~/.ssh/config

host *localhost*
hostname 192.168.0.10
User jenkins
Port 29418
TCPKeepAlive yes
IdentityFile ~/.ssh/id_rsa
git clone --progress ssh://jenkins@localhost:29418/playground.git

Cloning into 'playground'...
remote: Counting objects: 65, done
remote: Finding sources: 100% (65/65)
remote: Total 68 (delta 22), reused 68 (delta 22)
Receiving objects: 100% (68/68), 7.44 KiB | 0 bytes/s, done.
Resolving deltas: 100% (22/22), done.
Checking connectivity... done.
@shanesmith
Copy link
Owner

Simply seems like your key pair wasn't registered with the server (which appears to be localhost?)

I wouldn't think that this would be a problem with gerrit-cli, are you able to performa a regular git clone of the project?

@fstefanov
Copy link
Author

Yeah i can do regular git clone, but gerrit clone is failing.

@torarnv
Copy link

torarnv commented Sep 3, 2019

Same problem here:

gerrit --loglevel 10 --verbose --debug ssh git-receive-pack
gerrit ERROR UNKNOWN null@github.com: Permission denied (publickey).

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

3 participants