Gitlab-shell & # 8594; git push -u origin master & # 8594; fatal: the far end unexpectedly hung up

I am using gitlab-shell to manage git connections and here is my problem:

$ git push -v -u origin master
Pushing to git@git.my-srv.fr: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

So everyone says this is a different mistake ?! How can I get more information about the git / ssh exchange?

+5
source share
5 answers

I tried this: $ ssh -vT git @ git.my-srv.fr

I see redirect 301 in the http log. (My proxy redirects http to https)

I fixed it in the gitlab-shell configuration, file: /home/git/gitlab-shell/config.yml

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

the new error message was an ssl certificate verification error (my certificate is automatically signed without authorization of the third part)

/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-shell: https://github.com/gitlabhq/gitlab-shell/pull/9

: https://github.com/jcockhren/gitlab-shell/commit/846ee24697f386cd9fcbc4ab1a7fb8ae1ccb46ee

+12

5.4, gitlab-shell/config.yml

self_signed_cert: true

+5

config.yml gitlab-shell, URL-, ( git @..)

https://github.com/gitlabhq/gitlab-shell/issues/65

config.yml gitlab-shell URL-. http://git.domain.com:8080/.

+4

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

.

+1

, - , .

Clear the error when git cannot access the gitlab web server. For me it was the HTTP authentication that I imposed on nginx. After removing it, the error disappeared.

0
source

All Articles