Logo Questions Linux Laravel Mysql Ubuntu Git Menu
 

gitlab-shell -> git push -u origin master -> fatal: The remote end hung up unexpectedly

Tags:

git

ssh

gitlab

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

$ 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

So everybody say it's the other fault?! How can I have more informations about the git/ssh network exchange?

like image 275
1000i100 Avatar asked Mar 16 '13 01:03

1000i100


People also ask

How do I resolve a fatal repository not git?

To do so, you need to navigate to the correct folder and then run the command git init , which will create a new empty Git repository or reinitialize an existing one.

What is postBuffer?

postBuffer is about: Maximum size in bytes of the buffer used by smart HTTP transports when POSTing data to the remote system. For requests larger than this buffer size, HTTP/1.1 and Transfer-Encoding: chunked is used to avoid creating a massive pack file locally.

How do you increase git buffer size to the largest individual file size of your repo?

Increase the Git buffer size to the largest individual file size of your repo: git config --global http. postBuffer 157286400.


1 Answers

I've tried this : $ ssh -vT [email protected]

I've see in the log an http redirect 301. (my proxy server redirect http to https)

I've correct it in gitlab-shell config, 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 a ssl certificate verification fail (my certificate is auto-signed with no 3rd part autority)

so i've modified /home/git/gitlab-shell/lib/gitlab_net.rb to add this :

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

between these lines :

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)

Like describe on this gitlab-shell closed pull request (and issue) : https://github.com/gitlabhq/gitlab-shell/pull/9

And here is the original commit content : https://github.com/jcockhren/gitlab-shell/commit/846ee24697f386cd9fcbc4ab1a7fb8ae1ccb46ee

like image 113
1000i100 Avatar answered Oct 31 '22 14:10

1000i100