weixin_43889163
今夕何夕 不忘初心
采纳率0%
2021-02-27 15:01

gitlab 配置了ssh git拉取项目需要输入密码

 

OpenSSH_8.4p1, OpenSSL 1.1.1i  8 Dec 2020
debug1: Reading configuration data /etc/ssh/ssh_config
debug1: Connecting to git.yijiago.com [47.99.193.47] port 22.
debug1: Connection established.
debug1: identity file /c/Users/Mr_li/.ssh/id_rsa type 0
debug1: identity file /c/Users/Mr_li/.ssh/id_rsa-cert type -1
debug1: identity file /c/Users/Mr_li/.ssh/id_dsa type -1
debug1: identity file /c/Users/Mr_li/.ssh/id_dsa-cert type -1
debug1: identity file /c/Users/Mr_li/.ssh/id_ecdsa type -1
debug1: identity file /c/Users/Mr_li/.ssh/id_ecdsa-cert type -1
debug1: identity file /c/Users/Mr_li/.ssh/id_ecdsa_sk type -1
debug1: identity file /c/Users/Mr_li/.ssh/id_ecdsa_sk-cert type -1
debug1: identity file /c/Users/Mr_li/.ssh/id_ed25519 type -1
debug1: identity file /c/Users/Mr_li/.ssh/id_ed25519-cert type -1
debug1: identity file /c/Users/Mr_li/.ssh/id_ed25519_sk type -1
debug1: identity file /c/Users/Mr_li/.ssh/id_ed25519_sk-cert type -1
debug1: identity file /c/Users/Mr_li/.ssh/id_xmss type -1
debug1: identity file /c/Users/Mr_li/.ssh/id_xmss-cert type -1
debug1: Local version string SSH-2.0-OpenSSH_8.4
debug1: Remote protocol version 2.0, remote software version OpenSSH_6.6.1
debug1: match: OpenSSH_6.6.1 pat OpenSSH_6.6.1* compat 0x04000002
debug1: Authenticating to git.yijiago.com:22 as 'git'
debug1: SSH2_MSG_KEXINIT sent
debug1: SSH2_MSG_KEXINIT received
debug1: kex: algorithm: curve25519-sha256@libssh.org
debug1: kex: host key algorithm: ecdsa-sha2-nistp256
debug1: kex: server->client cipher: chacha20-poly1305@openssh.com MAC: <implicit> compression: none
debug1: kex: client->server cipher: chacha20-poly1305@openssh.com MAC: <implicit> compression: none
debug1: expecting SSH2_MSG_KEX_ECDH_REPLY
debug1: Server host key: ecdsa-sha2-nistp256 SHA256:KEpLcdMgQOxVmTloML01SGEyBgqLigi1p0uyxRh8y5I
debug1: Host 'git.yijiago.com' is known and matches the ECDSA host key.
debug1: Found key in /c/Users/Mr_li/.ssh/known_hosts:1
debug1: rekey out after 134217728 blocks
debug1: SSH2_MSG_NEWKEYS sent
debug1: expecting SSH2_MSG_NEWKEYS
debug1: SSH2_MSG_NEWKEYS received
debug1: rekey in after 134217728 blocks
debug1: Will attempt key: /c/Users/Mr_li/.ssh/id_rsa RSA SHA256:sarHsqk9x87McC9p4/Jt8Uilxgq04sTgSQumybjJNeU
debug1: Will attempt key: /c/Users/Mr_li/.ssh/id_dsa
debug1: Will attempt key: /c/Users/Mr_li/.ssh/id_ecdsa
debug1: Will attempt key: /c/Users/Mr_li/.ssh/id_ecdsa_sk
debug1: Will attempt key: /c/Users/Mr_li/.ssh/id_ed25519
debug1: Will attempt key: /c/Users/Mr_li/.ssh/id_ed25519_sk
debug1: Will attempt key: /c/Users/Mr_li/.ssh/id_xmss
debug1: SSH2_MSG_SERVICE_ACCEPT received
debug1: Authentications that can continue: publickey,gssapi-keyex,gssapi-with-mic,password
debug1: Next authentication method: publickey
debug1: Offering public key: /c/Users/Mr_li/.ssh/id_rsa RSA SHA256:sarHsqk9x87McC9p4/Jt8Uilxgq04sTgSQumybjJNeU
debug1: Authentications that can continue: publickey,gssapi-keyex,gssapi-with-mic,password
debug1: Trying private key: /c/Users/Mr_li/.ssh/id_dsa
debug1: Trying private key: /c/Users/Mr_li/.ssh/id_ecdsa
debug1: Trying private key: /c/Users/Mr_li/.ssh/id_ecdsa_sk
debug1: Trying private key: /c/Users/Mr_li/.ssh/id_ed25519
debug1: Trying private key: /c/Users/Mr_li/.ssh/id_ed25519_sk
debug1: Trying private key: /c/Users/Mr_li/.ssh/id_xmss
debug1: Next authentication method: password
 

  • 点赞
  • 写回答
  • 关注问题
  • 收藏
  • 复制链接分享
  • 邀请回答

1条回答

  • xiphi_6 xiphi1978 1月前

    看上去好像是Openssh配置的有问题,不允许git用户使用Publickey的认证方式。

    1. 描述一下你的gitlab的安装方式
    2. 提供一下Openssh的配置:/etc/ssh/ssh_config

    你也可以先自行检查一下ssh_config的一下参数,调整后重启opensshd再试:

    AllowUsers

    AuthenticationMethods

    点赞 评论 复制链接分享