简体   繁体   中英

GitLab SSH clone not working but HTTP works fine

I have problem with Gitlab 7.5.0.rc1 when trying to clone repo by SSH (HTTP cloning works fine).

System:

Linux debian 3.2.0-4-686-pae #1 SMP Debian 3.2.63-2+deb7u1 i686 GNU/Linux

Gitlab check: http://pastebin.com/LDbJPqT8 Cloning repo result:

user@host:~/projects$ git clone git@mydomain.local:8081:user/my-test-project.git
Cloning into 'my-test-project'...
Enter passphrase for key '/home/user/.ssh/id_rsa': 
Access denied.
fatal: Could not read from remote repository.

Please make sure you have the correct access rights
and the repository exists.

Log from /var/log/auth.log when trying to clone repo:

Dec 17 12:12:25 debian sshd[20504]: Accepted publickey for git from 192.168.1.54 port 41068 ssh2
Dec 17 12:12:25 debian sshd[20504]: pam_unix(sshd:session): session opened for user git by (uid=0)
Dec 17 12:12:25 debian sshd[20509]: Received disconnect from 192.168.1.54: 11: disconnected by user
Dec 17 12:12:25 debian sshd[20504]: pam_unix(sshd:session): session closed for user git

Gitlab is working on nginx. Part of VH config:

## Normal HTTP host
    server {
      listen *:8081; 
      server_name mydomain.local; 
      ...

Permissions:

root@debian:/home/git# ls -l
total 16
drwxr-xr-x 16 git git 4096 Nov 19 07:41 gitlab
drwxr-x---  3 git git 4096 Dec 17 11:13 gitlab-satellites
drwxr-xr-x  8 git git 4096 Dec 17 10:59 gitlab-shell
drwxrws---  4 git git 4096 Dec 17 08:05 repositories

I've really search a lot before i've write this message but with no luck. As You can see i have LDAP disabled and lot of threads over the net talks about stuff like 'it happend with ldap user. removing it and adding again helped'. But it shouldnt be a problem here right?

Please give me something...

On the backend of git clone it is trying to ssh to that machine. I'd suggest running ssh -vvvv git@mydomain.local which might give you some more information about the problem.

The technical post webpages of this site follow the CC BY-SA 4.0 protocol. If you need to reprint, please indicate the site URL or the original address.Any question please contact:yoyou2525@163.com.

 
粤ICP备18138465号  © 2020-2024 STACKOOM.COM