2013-03-16 92 views
5

我使用gitlab壳来管理git的连接,这里是我的问题:gitlab壳 - >混帐推-u主产地 - >致命:远程端挂机意外

$ git push -v -u origin master 
Pushing to [email protected]:monProjet.git 
fatal: The remote end hung up unexpectedly 

# tail -f /var/log/auth.log 
Mar 15 15:53:12 my-srv sshd[3133]: Accepted publickey for git from my-ip port 50790 ssh2 
Mar 15 15:53:12 my-srv sshd[3133]: pam_unix(sshd:session): session opened for user git by (uid=0) 
Mar 15 15:53:12 my-srv sshd[3285]: Received disconnect from my-ip: 11: disconnected by user 
Mar 15 15:53:12 my-srv sshd[3133]: pam_unix(sshd:session): session closed for user git 

那么大家都说这是另一个错?我怎样才能获得更多关于git/ssh网络交换的信息?

+0

'ssh -vT git @ git.my-srv.fr'? – adamdunson 2013-03-16 01:25:10

+0

这里是结果(这是太长时间tu复制它的评论)http://pastebin.com/TUsj8aSA – GammaNu 2013-03-19 10:25:21

回答

12

我已经试过这样: $ SSH -vT [email protected]

我在看到登录HTTP重定向301(我的代理服务器的HTTP重定向到https )

我已经纠正它gitlab壳配置,文件:/home/git/gitlab-shell/config.yml

# Url to gitlab instance. Used for api calls 
gitlab_url: "https://git.my-srv.fr/" 

新的错误消息是一个SSL证书验证失败(米Ÿ证书是自签名的,没有第三部分autority)

所以我修改/home/git/gitlab-shell/lib/gitlab_net.rb 来补充一点:

http.verify_mode = OpenSSL::SSL::VERIFY_NONE if (http.use_ssl?) 

之间这些行:

http.use_ssl = (url.port == 443) 
http.verify_mode = OpenSSL::SSL::VERIFY_NONE if (http.use_ssl?) 
request = Net::HTTP::Get.new(url.request_uri) 

喜欢上了这gitlab壳形容关闭拉请求(和问题): https://github.com/gitlabhq/gitlab-shell/pull/9

这里是原始提交内容: https://github.com/jcockhren/gitlab-shell/commit/846ee24697f386cd9fcbc4ab1a7fb8ae1ccb46ee

+0

这帮助了我,为你upvote。 – Drewman 2013-03-24 13:28:46

1

我在我的gitlab安装上有完全相同的行为。在我的情况下,这是一个与SSL证书有关的问题。这是很难赶上这是因为:

https://gitlab.example.com ==> padlock shows up, everything seems OK 
openssl s_client -connect ==> Verify return code: 21 (unable to verify... 

由于gitlab使用OpenSSL的验证SSL连接,它退出时致命OpenSSL的抱怨。这个问题是固定的,通过粘贴创建我的服务器gitlab.example.com一个“正确”的证书:

ROOT-issuers-cert 
Intermediate-cert 
cert-for-example.com 

到一个文本文件中。

5

自5.4版本以来,您可以在上编辑gitlab-shell/config。阳明海运

self_signed_cert:真

0

万一有人来此主题像我这样的错误搜索..

很显然,当git的不能访问Web服务器gitlab错误到达。对我来说,这是一个我用在nginx上的http用户身份验证。删除后,错误消失了。

相关问题