Warning: file_get_contents(/data/phpspider/zhask/data//catemap/1/ssh/2.json): failed to open stream: No such file or directory in /data/phpspider/zhask/libs/function.php on line 167

Warning: Invalid argument supplied for foreach() in /data/phpspider/zhask/libs/tag.function.php on line 1116

Notice: Undefined index: in /data/phpspider/zhask/libs/function.php on line 180

Warning: array_chunk() expects parameter 1 to be array, null given in /data/phpspider/zhask/libs/function.php on line 181
与gitlab的SSH连接_Ssh_Gitlab - Fatal编程技术网

与gitlab的SSH连接

与gitlab的SSH连接,ssh,gitlab,Ssh,Gitlab,我无法通过SSH(https工作正常)克隆gitlab上托管的存储库。 公钥已通过web界面提交给gitlab,但服务器出于某种原因不接受提供的密钥,而是返回到密码验证。奇怪的是,ssh-auth可以在其他服务器上工作,所以我假设我需要更改ssh\u-config中的某些内容,以使其与gitlab一起工作。如能就此事提出一些建议,我将不胜感激 ssh-vT日志打印以下内容: OpenSSH_6.6.1, OpenSSL 1.0.1f 6 Jan 2014 debug1: Reading conf

我无法通过SSH(https工作正常)克隆gitlab上托管的存储库。 公钥已通过web界面提交给gitlab,但服务器出于某种原因不接受提供的密钥,而是返回到密码验证。奇怪的是,ssh-auth可以在其他服务器上工作,所以我假设我需要更改ssh\u-config中的某些内容,以使其与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
git@domains's password: 

确保您的公共ssh密钥已在GitLab帐户中正确注册(作为一个连续行)

例如,其中提到,如果在设置GitLab之前公钥已经在
~/.ssh/authorized_keys
中,或者
authorized_keys
文件不同步,那么它将无法工作