2014-09-07 6 views
1

У меня возникли проблемы с клонированием репозитория, размещенного на gitlab через SSH (https отлично работает). Открытый ключ был отправлен gitlab через веб-интерфейс, но сервер по какой-либо причине не принимает предложенный ключ и вместо этого возвращается к аутентификации паролей. Как ни странно, ssh auth работает на других серверах, поэтому я предполагаю, что мне нужно что-то изменить в ssh_config, чтобы он работал с gitlab. Я был бы признателен за некоторые советы по этому вопросу.SSH соединение с gitlab

журнал печатает SSH -vt следующие:

OpenSSH_6.6.1, OpenSSL 1.0.1f 6 Jan 2014 
debug1: Reading configuration data /etc/ssh/ssh_config 
debug1: /etc/ssh/ssh_config line 19: Applying options for * 
debug1: Connecting to domain [172.16.64.85] port 22. 
debug1: Connection established. 
debug1: could not open key file '/etc/ssh/ssh_host_key': No such file or directory 
debug1: could not open key file '/etc/ssh/ssh_host_dsa_key': Permission denied 
debug1: could not open key file '/etc/ssh/ssh_host_ecdsa_key': Permission denied 
debug1: could not open key file '/etc/ssh/ssh_host_rsa_key': Permission denied 
debug1: could not open key file '/etc/ssh/ssh_host_ed25519_key': Permission denied 
debug1: could not open key file '/etc/ssh/ssh_host_dsa_key': Permission denied 
debug1: could not open key file '/etc/ssh/ssh_host_ecdsa_key': Permission denied 
debug1: could not open key file '/etc/ssh/ssh_host_rsa_key': Permission denied 
debug1: could not open key file '/etc/ssh/ssh_host_ed25519_key': Permission denied 
debug1: identity file /home/ja/.ssh/id_rsa type 1 
debug1: identity file /home/ja/.ssh/id_rsa-cert type -1 
debug1: identity file /home/ja/.ssh/id_dsa type -1 
debug1: identity file /home/ja/.ssh/id_dsa-cert type -1 
debug1: identity file /home/ja/.ssh/id_ecdsa-cert type -1 
debug1: identity file /home/ja/.ssh/id_ed25519 type -1 
debug1: identity file /home/ja/.ssh/id_ed25519-cert type -1 
debug1: Enabling compatibility mode for protocol 2.0 
debug1: Local version string SSH-2.0-OpenSSH_6.6.1p1 Ubuntu-2ubuntu2 
debug1: Remote protocol version 2.0, remote software version OpenSSH_5.9p1 Debian-5ubuntu1.4 
debug1: match: OpenSSH_5.9p1 Debian-5ubuntu1.4 pat OpenSSH_5* compat 0x0c000000 
debug1: SSH2_MSG_KEXINIT sent 
debug1: SSH2_MSG_KEXINIT received 
debug1: kex: server->client aes128-ctr hmac-md5 none 
debug1: kex: client->server aes128-ctr hmac-md5 none 
debug1: sending SSH2_MSG_KEX_ECDH_INIT 
debug1: expecting SSH2_MSG_KEX_ECDH_REPLY 
debug1: Server host key: ECDSA b6:a4:91:33:80:c3:46:82:e2:4e:21:be:7e:a0:b0:c5 
debug1: Host 'domain' is known and matches the ECDSA host key. 
debug1: Found key in /home/ja/.ssh/known_hosts:1 
debug1: ssh_ecdsa_verify: signature correct 
debug1: SSH2_MSG_NEWKEYS sent 
debug1: expecting SSH2_MSG_NEWKEYS 
debug1: SSH2_MSG_NEWKEYS received 
debug1: Roaming not allowed by server 
debug1: SSH2_MSG_SERVICE_REQUEST sent 
debug1: SSH2_MSG_SERVICE_ACCEPT received 
debug1: Authentications that can continue: publickey,password 
debug1: Next authentication method: publickey 
debug1: Offering RSA public key: /home/ja/.ssh/id_rsa 
debug1: Authentications that can continue: publickey,password 
debug1: Trying private key: /home/ja/.ssh/id_dsa 
debug1: Trying private key: /home/ja/.ssh/id_ecdsa 
debug1: Trying private key: /home/ja/.ssh/id_ed25519 
debug1: Next authentication method: password 
[email protected]'s password: 

ответ

0

Убедитесь, что ваш открытый ключ SSH был правильно зарегистрирован в вашем аккаунте GitLab (в виде одной непрерывной линии).

GitLab SSH troubleshooting page упоминает, например, что он не будет работать, если открытый ключ уже был в ~/.ssh/authorized_keys до того GitLab была установка, или если authorized_keys файл isout синхронизации.