ssh连接gitlab,一直要求输入密码

浏览:28日期:2023-10-21

问题描述

测试连接是否成功。老出现上面要求输入密码。git clone 项目也要求输入密码,但是我密码输入完之后不成功,提示同样的信息。

问题解答

回答1:

SSH keys are a way to identify trusted computers, without involving passwords. The steps below will walk you through generating an SSH key and then adding the public key to your account.

https://help.github.com/articles/generating-ssh-keys/

回答2:

有没有上传公钥

回答3:

ssh协议交互是需要公密钥对的,上传公钥到git服务端

回答4:

win系统上使用Git Bash 试试,我也遇到过这个问题,配置了ssh-key也没用,使用Git Bash就可以了

回答5:

楼主解决了嘛,可否把解决方法贴出来

回答6:

我现在死活要输入密码,我设置ssh-key的时候没有设置密码,为何要输入密码?

ssh -vvv git@172.20.9.19OpenSSH_7.1p2, OpenSSL 1.0.2h 3 May 2016debug1: Reading configuration data /c/Documents and Settings/Administrator/.ssh/configdebug1: /c/Documents and Settings/Administrator/.ssh/config line 4: Applying options for 172.20.9.19debug1: Reading configuration data /etc/ssh/ssh_configdebug2: ssh_connect: needpriv 0debug1: Connecting to 172.20.9.19 [172.20.9.19] port 22.debug1: Connection established.debug1: identity file /c/Documents and Settings/Administrator/.ssh/id_rsa type 1debug1: key_load_public: No such file or directorydebug1: identity file /c/Documents and Settings/Administrator/.ssh/id_rsa-cert type -1debug1: Enabling compatibility mode for protocol 2.0debug1: Local version string SSH-2.0-OpenSSH_7.1debug1: Remote protocol version 2.0, remote software version OpenSSH_5.3debug1: match: OpenSSH_5.3 pat OpenSSH_5* compat 0x0c000000debug2: fd 3 setting O_NONBLOCKdebug1: Authenticating to 172.20.9.19:22 as ’git’debug3: hostkeys_foreach: reading file '/c/Documents and Settings/Administrator/.ssh/known_hosts'debug3: record_hostkey: found key type RSA in file /c/Documents and Settings/Administrator/.ssh/known_hosts:1debug3: load_hostkeys: loaded 1 keys from 172.20.9.19debug3: order_hostkeyalgs: prefer hostkeyalgs: ssh-rsa-cert-v01@openssh.com,ssh-rsadebug1: SSH2_MSG_KEXINIT sentdebug1: SSH2_MSG_KEXINIT receiveddebug2: kex_parse_kexinit: curve25519-sha256@libssh.org,ecdh-sha2-nistp256,ecdh-sha2-nistp384,ecdh-sha2-nistp521,diffie-hellman-group-exchange-sha256,diffie-hellman-group-exchange-sha1,diffie-hellman-group14-sha1debug2: kex_parse_kexinit: ssh-rsa-cert-v01@openssh.com,ssh-rsa,ecdsa-sha2-nistp256-cert-v01@openssh.com,ecdsa-sha2-nistp384-cert-v01@openssh.com,ecdsa-sha2-nistp521-cert-v01@openssh.com,ssh-ed25519-cert-v01@openssh.com,ecdsa-sha2-nistp256,ecdsa-sha2-nistp384,ecdsa-sha2-nistp521,ssh-ed25519debug2: kex_parse_kexinit: chacha20-poly1305@openssh.com,aes128-ctr,aes192-ctr,aes256-ctr,aes128-gcm@openssh.com,aes256-gcm@openssh.com,arcfour256,arcfour128,aes128-cbc,3des-cbc,blowfish-cbc,cast128-cbc,aes192-cbc,aes256-cbc,arcfour,rijndael-cbc@lysator.liu.sedebug2: kex_parse_kexinit: chacha20-poly1305@openssh.com,aes128-ctr,aes192-ctr,aes256-ctr,aes128-gcm@openssh.com,aes256-gcm@openssh.com,arcfour256,arcfour128,aes128-cbc,3des-cbc,blowfish-cbc,cast128-cbc,aes192-cbc,aes256-cbc,arcfour,rijndael-cbc@lysator.liu.sedebug2: kex_parse_kexinit: umac-64-etm@openssh.com,umac-128-etm@openssh.com,hmac-sha2-256-etm@openssh.com,hmac-sha2-512-etm@openssh.com,hmac-sha1-etm@openssh.com,umac-64@openssh.com,umac-128@openssh.com,hmac-sha2-256,hmac-sha2-512,hmac-sha1,hmac-md5-etm@openssh.com,hmac-ripemd160-etm@openssh.com,hmac-sha1-96-etm@openssh.com,hmac-md5-96-etm@openssh.com,hmac-md5,hmac-ripemd160,hmac-ripemd160@openssh.com,hmac-sha1-96,hmac-md5-96debug2: kex_parse_kexinit: umac-64-etm@openssh.com,umac-128-etm@openssh.com,hmac-sha2-256-etm@openssh.com,hmac-sha2-512-etm@openssh.com,hmac-sha1-etm@openssh.com,umac-64@openssh.com,umac-128@openssh.com,hmac-sha2-256,hmac-sha2-512,hmac-sha1,hmac-md5-etm@openssh.com,hmac-ripemd160-etm@openssh.com,hmac-sha1-96-etm@openssh.com,hmac-md5-96-etm@openssh.com,hmac-md5,hmac-ripemd160,hmac-ripemd160@openssh.com,hmac-sha1-96,hmac-md5-96debug2: kex_parse_kexinit: none,zlib@openssh.com,zlibdebug2: kex_parse_kexinit: none,zlib@openssh.com,zlibdebug2: kex_parse_kexinit:debug2: kex_parse_kexinit:debug2: first_kex_follows 0debug2: reserved 0debug2: kex_parse_kexinit: diffie-hellman-group-exchange-sha256,diffie-hellman-group-exchange-sha1,diffie-hellman-group14-sha1,diffie-hellman-group1-sha1debug2: kex_parse_kexinit: ssh-rsa,ssh-dssdebug2: kex_parse_kexinit: aes128-ctr,aes192-ctr,aes256-ctr,arcfour256,arcfour128,aes128-cbc,3des-cbc,blowfish-cbc,cast128-cbc,aes192-cbc,aes256-cbc,arcfour,rijndael-cbc@lysator.liu.sedebug2: kex_parse_kexinit: aes128-ctr,aes192-ctr,aes256-ctr,arcfour256,arcfour128,aes128-cbc,3des-cbc,blowfish-cbc,cast128-cbc,aes192-cbc,aes256-cbc,arcfour,rijndael-cbc@lysator.liu.sedebug2: kex_parse_kexinit: hmac-md5,hmac-sha1,umac-64@openssh.com,hmac-sha2-256,hmac-sha2-512,hmac-ripemd160,hmac-ripemd160@openssh.com,hmac-sha1-96,hmac-md5-96debug2: kex_parse_kexinit: hmac-md5,hmac-sha1,umac-64@openssh.com,hmac-sha2-256,hmac-sha2-512,hmac-ripemd160,hmac-ripemd160@openssh.com,hmac-sha1-96,hmac-md5-96debug2: kex_parse_kexinit: none,zlib@openssh.comdebug2: kex_parse_kexinit: none,zlib@openssh.comdebug2: kex_parse_kexinit:debug2: kex_parse_kexinit:debug2: first_kex_follows 0debug2: reserved 0debug1: kex: server->client aes128-ctr umac-64@openssh.com nonedebug1: kex: client->server aes128-ctr umac-64@openssh.com nonedebug1: SSH2_MSG_KEX_DH_GEX_REQUEST(1024<3072<8192) sentdebug1: got SSH2_MSG_KEX_DH_GEX_GROUPdebug2: bits set: 1534/3072debug1: SSH2_MSG_KEX_DH_GEX_INIT sentdebug1: got SSH2_MSG_KEX_DH_GEX_REPLYdebug1: Server host key: ssh-rsa SHA256:l8STlwterJLmBr1aTLSTkAgGcsA/c9YfF42pdr8XQjAdebug3: hostkeys_foreach: reading file '/c/Documents and Settings/Administrator/.ssh/known_hosts'debug3: record_hostkey: found key type RSA in file /c/Documents and Settings/Administrator/.ssh/known_hosts:1debug3: load_hostkeys: loaded 1 keys from 172.20.9.19debug1: Host ’172.20.9.19’ is known and matches the RSA host key.debug1: Found key in /c/Documents and Settings/Administrator/.ssh/known_hosts:1debug2: bits set: 1535/3072debug2: set_newkeys: mode 1debug1: SSH2_MSG_NEWKEYS sentdebug1: expecting SSH2_MSG_NEWKEYSdebug2: set_newkeys: mode 0debug1: SSH2_MSG_NEWKEYS receiveddebug1: SSH2_MSG_SERVICE_REQUEST sentdebug2: service_accept: ssh-userauthdebug1: SSH2_MSG_SERVICE_ACCEPT receiveddebug2: key: /c/Documents and Settings/Administrator/.ssh/id_rsa (0x2005eeb0), explicitdebug1: Authentications that can continue: publickey,gssapi-keyex,gssapi-with-mic,passworddebug3: start over, passed a different list publickey,gssapi-keyex,gssapi-with-mic,passworddebug3: preferred publickey,keyboard-interactive,passworddebug3: authmethod_lookup publickeydebug3: remaining preferred: keyboard-interactive,passworddebug3: authmethod_is_enabled publickeydebug1: Next authentication method: publickeydebug1: Offering RSA public key: /c/Documents and Settings/Administrator/.ssh/id_rsadebug3: send_pubkey_testdebug2: we sent a publickey packet, wait for replydebug1: Authentications that can continue: publickey,gssapi-keyex,gssapi-with-mic,passworddebug2: we did not send a packet, disable methoddebug3: authmethod_lookup passworddebug3: remaining preferred: ,passworddebug3: authmethod_is_enabled passworddebug1: Next authentication method: passwordgit@172.20.9.19’s password:debug2: we sent a password packet, wait for replydebug1: Authentications that can continue: publickey,gssapi-keyex,gssapi-with-mic,passwordPermission denied, please try again.git@172.20.9.19’s password:debug2: we sent a password packet, wait for replydebug1: Authentications that can continue: publickey,gssapi-keyex,gssapi-with-mic,passwordPermission denied, please try again.git@172.20.9.19’s password:debug2: we sent a password packet, wait for replydebug1: Authentications that can continue: publickey,gssapi-keyex,gssapi-with-mic,passworddebug2: we did not send a packet, disable methoddebug1: No more authentication methods to try.Permission denied (publickey,gssapi-keyex,gssapi-with-mic,password).

相关文章: