gerrit/Documentation/error-permission-denied.txt
Hugo Arès 93ef427306 Revert "Add '-T' switch to the SSH connectivity check examples"
This commit was needed because of the regression introduced in SSHD used
with MINA backend. SSHD version 1.2.0 fixed that regression so this
change is no longer needed.

This reverts commit 7ee677b9d3.

Change-Id: I90dc2889c601083a312f643c52b2dcf6a59ab2b6
2016-04-05 18:22:09 +00:00

64 lines
1.9 KiB
Plaintext

= Permission denied (publickey)
With this error message an SSH command to Gerrit is rejected if the
SSH authentication is not successful.
The link:http://en.wikipedia.org/wiki/Secure_Shell[SSH] protocol uses link:http://en.wikipedia.org/wiki/Public-key_cryptography[Public-key Cryptography] for authentication.
This means for a successful SSH authentication you need your private
SSH key and the corresponding public SSH key must be known to Gerrit.
If you are facing this problem, do the following:
. Verify that you are using the correct username for the SSH command
and that it is typed correctly (case sensitive). You can look up
your username in the Gerrit Web UI under 'Settings' -> 'Profile'.
. Verify that you have uploaded your public SSH key for your Gerrit
account. To do this go in the Gerrit Web UI to 'Settings' ->
'SSH Public Keys' and check that your public SSH key is there. If
your public SSH key is not there you have to upload it.
. Verify that you are using the correct private SSH key. To find out
which private SSH key is used test the SSH authentication as
described below. From the trace you should see which private SSH
key is used.
== Test SSH authentication
To test the SSH authentication you can run the following SSH command.
This command will print out a detailed trace which is helpful to
analyze problems with the SSH authentication:
----
$ ssh -vv -p 29418 john.doe@git.example.com
----
If the SSH authentication is successful you should find the following
lines in the output:
----
...
debug1: Authentication succeeded (publickey).
...
**** Welcome to Gerrit Code Review ****
Hi John Doe, you have successfully connected over SSH.
Unfortunately, interactive shells are disabled.
To clone a hosted Git repository, use:
git clone ssh://john.doe@git.example.com:29418/REPOSITORY_NAME.git
...
----
GERRIT
------
Part of link:error-messages.html[Gerrit Error Messages]
SEARCHBOX
---------