简体   繁体   English

GitLab SSH克隆不起作用,但HTTP可以正常工作

[英]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). 尝试通过SSH克隆存储库时,Gitlab 7.5.0.rc1出现问题(HTTP克隆工作正常)。

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: Gitlab检查: http ://pastebin.com/LDbJPqT8克隆回购结果:

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: 尝试克隆存储库时,从/var/log/auth.log登录:

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. Gitlab正在研究nginx。 Part of VH config: VH配置的一部分:

## 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. 如您所见,我禁用了LDAP,并且网上有很多线程谈论诸如ldap用户发生的事情。 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. 在git clone的后端,它正在尝试SSH到该计算机。 I'd suggest running ssh -vvvv git@mydomain.local which might give you some more information about the problem. 我建议运行ssh -vvvv git@mydomain.local,这可能会给您有关此问题的更多信息。

声明:本站的技术帖子网页,遵循CC BY-SA 4.0协议,如果您需要转载,请注明本站网址或者原文地址。任何问题请咨询:yoyou2525@163.com.

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