本文介绍了Gitlab在推送git用户时提示输入密码的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧! 问题描述 限时删除!! 我在我的linode服务器上安装了gitlab。 gitlab的所有服务都很棒。我能够登录,创建用户,回购等但是我面临的问题是,当我尝试推动回购时,它会提示git用户的密码,如下所示:I installed gitlab on my servers at linode. All services of gitlab are working fantastic. I am able to login, create users, repos etc.But the problem I am facing is when I try to push a repo it prompts a password for the git user as follows:[email protected]'s password我遵循了以下安装gitlab的说明: https:/ /github.com/gitlabhq/gitlabhq/blob/master/doc/install/installation.md ,并禁用使用安装指南中提到的以下行获得用户git的登录名:I have followed the instructions of installing gitlab at: https://github.com/gitlabhq/gitlabhq/blob/master/doc/install/installation.md and have disable the login got the user git using the following line mentioned in the installation guide:I am using gitlab version 6. What could be the problem?输出: ssh -Tvvv [email protected] 如下:The output of: ssh -Tvvv [email protected] is as follows:OpenSSH_5.9p1 Debian-5ubuntu1.1, OpenSSL 1.0.1 14 Mar 2012debug1: Reading configuration data /etc/ssh/ssh_configdebug1: /etc/ssh/ssh_config line 19: Applying options for *debug2: ssh_connect: needpriv 0debug1: Connecting to gitlab.myserver.com [MY_IP] port 22.debug1: Connection established.debug3: Incorrect RSA1 identifierdebug3: Could not load "/home/swaroop/.ssh/id_rsa" as a RSA1 public keydebug1: identity file /home/swaroop/.ssh/id_rsa type 1debug1: Checking blacklist file /usr/share/ssh/blacklist.RSA-2048debug1: Checking blacklist file /etc/ssh/blacklist.RSA-2048debug1: identity file /home/swaroop/.ssh/id_rsa-cert type -1debug1: identity file /home/swaroop/.ssh/id_dsa type -1debug1: identity file /home/swaroop/.ssh/id_dsa-cert type -1debug1: identity file /home/swaroop/.ssh/id_ecdsa type -1debug1: identity file /home/swaroop/.ssh/id_ecdsa-cert type -1debug1: Remote protocol version 2.0, remote software version OpenSSH_5.9p1 Debian-5ubuntu1.1debug1: match: OpenSSH_5.9p1 Debian-5ubuntu1.1 pat OpenSSH*debug1: Enabling compatibility mode for protocol 2.0debug1: Local version string SSH-2.0-OpenSSH_5.9p1 Debian-5ubuntu1.1debug2: fd 3 setting O_NONBLOCKdebug3: load_hostkeys: loading entries for host "gitlab.myserver.com" from file "/home/swaroop/.ssh/known_hosts"debug3: load_hostkeys: found key type ECDSA in file /home/swaroop/.ssh/known_hosts:92debug3: load_hostkeys: loaded 1 keysdebug3: order_hostkeyalgs: prefer hostkeyalgs: [email protected],[email protected],[email protected],ecdsa-sha2-nistp256,ecdsa-sha2-nistp384,ecdsa-sha2-nistp521debug1: SSH2_MSG_KEXINIT sentdebug1: SSH2_MSG_KEXINIT receiveddebug2: kex_parse_kexinit: ecdh-sha2-nistp256,ecdh-sha2-nistp384,ecdh-sha2-nistp521,diffie-hellman-group-exchange-sha256,diffie-hellman-group-exchange-sha1,diffie-hellman-group14-sha1,diffie-hellman-group1-sha1debug2: kex_parse_kexinit: [email protected],[email protected],[email protected],ecdsa-sha2-nistp256,ecdsa-sha2-nistp384,ecdsa-sha2-nistp521,[email protected],[email protected],[email protected],[email protected],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,[email protected]: kex_parse_kexinit: aes128-ctr,aes192-ctr,aes256-ctr,arcfour256,arcfour128,aes128-cbc,3des-cbc,blowfish-cbc,cast128-cbc,aes192-cbc,aes256-cbc,arcfour,[email protected]: kex_parse_kexinit: hmac-md5,hmac-sha1,[email protected],hmac-sha2-256,hmac-sha2-256-96,hmac-sha2-512,hmac-sha2-512-96,hmac-ripemd160,[email protected],hmac-sha1-96,hmac-md5-96debug2: kex_parse_kexinit: hmac-md5,hmac-sha1,[email protected],hmac-sha2-256,hmac-sha2-256-96,hmac-sha2-512,hmac-sha2-512-96,hmac-ripemd160,[email protected],hmac-sha1-96,hmac-md5-96debug2: kex_parse_kexinit: none,[email protected],zlibdebug2: kex_parse_kexinit: none,[email protected],zlibdebug2: kex_parse_kexinit:debug2: kex_parse_kexinit:debug2: kex_parse_kexinit: first_kex_follows 0debug2: kex_parse_kexinit: reserved 0debug2: kex_parse_kexinit: ecdh-sha2-nistp256,ecdh-sha2-nistp384,ecdh-sha2-nistp521,diffie-hellman-group-exchange-sha256,diffie-hellman-group-exchange-sha1,diffie-hellman-group14-sha1,diffie-hellman-group1-sha1debug2: kex_parse_kexinit: ssh-rsa,ssh-dss,ecdsa-sha2-nistp256debug2: kex_parse_kexinit: aes128-ctr,aes192-ctr,aes256-ctr,arcfour256,arcfour128,aes128-cbc,3des-cbc,blowfish-cbc,cast128-cbc,aes192-cbc,aes256-cbc,arcfour,[email protected]: kex_parse_kexinit: aes128-ctr,aes192-ctr,aes256-ctr,arcfour256,arcfour128,aes128-cbc,3des-cbc,blowfish-cbc,cast128-cbc,aes192-cbc,aes256-cbc,arcfour,[email protected]: kex_parse_kexinit: hmac-md5,hmac-sha1,[email protected],hmac-sha2-256,hmac-sha2-256-96,hmac-sha2-512,hmac-sha2-512-96,hmac-ripemd160,[email protected],hmac-sha1-96,hmac-md5-96debug2: kex_parse_kexinit: hmac-md5,hmac-sha1,[email protected],hmac-sha2-256,hmac-sha2-256-96,hmac-sha2-512,hmac-sha2-512-96,hmac-ripemd160,[email protected],hmac-sha1-96,hmac-md5-96debug2: kex_parse_kexinit: none,[email protected]: kex_parse_kexinit: none,[email protected]: kex_parse_kexinit:debug2: kex_parse_kexinit:debug2: kex_parse_kexinit: first_kex_follows 0debug2: kex_parse_kexinit: reserved 0debug2: mac_setup: found hmac-md5debug1: kex: server->client aes128-ctr hmac-md5 nonedebug2: mac_setup: found hmac-md5debug1: kex: client->server aes128-ctr hmac-md5 nonedebug1: sending SSH2_MSG_KEX_ECDH_INITdebug1: expecting SSH2_MSG_KEX_ECDH_REPLYdebug1: Server host key: ECDSA 92:57:61:35:b1:e2:16:3b:7f:ae:e7:8a:dc:0c:98:83debug3: load_hostkeys: loading entries for host "gitlab.myserver.com" from file "/home/swaroop/.ssh/known_hosts"debug3: load_hostkeys: found key type ECDSA in file /home/swaroop/.ssh/known_hosts:92debug3: load_hostkeys: loaded 1 keysdebug3: load_hostkeys: loading entries for host "MY_IP" from file "/home/swaroop/.ssh/known_hosts"debug3: load_hostkeys: found key type ECDSA in file /home/swaroop/.ssh/known_hosts:93debug3: load_hostkeys: loaded 1 keysdebug1: Host 'gitlab.myserver.com' is known and matches the ECDSA host key.debug1: Found key in /home/swaroop/.ssh/known_hosts:92debug1: ssh_ecdsa_verify: signature correctdebug2: kex_derive_keysdebug2: set_newkeys: mode 1debug1: SSH2_MSG_NEWKEYS sentdebug1: expecting SSH2_MSG_NEWKEYSdebug2: set_newkeys: mode 0debug1: SSH2_MSG_NEWKEYS receiveddebug1: Roaming not allowed by serverdebug1: SSH2_MSG_SERVICE_REQUEST sentdebug2: service_accept: ssh-userauthdebug1: SSH2_MSG_SERVICE_ACCEPT receiveddebug2: key: /home/swaroop/.ssh/id_rsa (0x7fd470589410)debug2: key: /home/swaroop/.ssh/id_dsa ((nil))debug2: key: /home/swaroop/.ssh/id_ecdsa ((nil))debug1: Authentications that can continue: publickey,passworddebug3: start over, passed a different list publickey,passworddebug3: preferred gssapi-keyex,gssapi-with-mic,publickey,keyboard-interactive,passworddebug3: authmethod_lookup publickeydebug3: remaining preferred: keyboard-interactive,passworddebug3: authmethod_is_enabled publickeydebug1: Next authentication method: publickeydebug1: Offering RSA public key: /home/swaroop/.ssh/id_rsadebug3: send_pubkey_testdebug2: we sent a publickey packet, wait for replydebug1: Authentications that can continue: publickey,passworddebug1: Trying private key: /home/swaroop/.ssh/id_dsadebug3: no such identity: /home/swaroop/.ssh/id_dsadebug1: Trying private key: /home/swaroop/.ssh/id_ecdsadebug3: no such identity: /home/swaroop/.ssh/id_ecdsadebug2: we did not send a packet, disable methoddebug3: authmethod_lookup passworddebug3: remaining preferred: ,passworddebug3: authmethod_is_enabled passworddebug1: Next authentication method: [email protected]'s password:以下是我运行时的输出: rvmsudo -u git -H bundle exec rake gitlab:env:info RAILS_ENV = productionAlso following is the output when I run: rvmsudo -u git -H bundle exec rake gitlab:env:info RAILS_ENV=productionSystem informationSystem: Ubuntu 12.04Current User: gitUsing RVM: yesRVM Version: 1.22.3Ruby Version: 2.0.0p247Gem Version: 2.0.7Bundler Version:1.3.5Rake Version: 10.1.0GitLab informationVersion: 6.0.0Revision: 6c1c284Directory: /home/git/gitlabDB Adapter: mysql2URL: http://gitlab.myserver.comHTTP Clone URL: http://gitlab.myserver.com/some-project.gitSSH Clone URL: [email protected]:some-project.gitUsing LDAP: noUsing Omniauth: noGitLab ShellVersion: 1.7.0Repositories: /home/git/repositories/Hooks: /home/git/gitlab-shell/hooks/Git: /usr/bin/git推荐答案我有同样的问题,但这是因为我的服务器只接受来自sshusers用户的ssh登录。I had the same problem but it was because my server only accept ssh login from users of "sshusers".在 / etc / ssh / sshd_config 我有跟随ng line:On /etc/ssh/sshd_config I had the following line :AllowGroups sshusers为了解决这个问题,我将git添加到了sshusers组:In order to fix this issue, I added git to sshusers group:$ sudo adduser git sshusers然后工作。 这篇关于Gitlab在推送git用户时提示输入密码的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持! 1403页,肝出来的.. 09-08 12:10