Saturday, April 16, 2016

TotoiseHG: An existing connection was forcibly closed by the remote host

Leave a Comment

I wanted to push a project from from TortoiseHg to GitHub. I know that, TortoiseHg is a front-end to the Mercurial distributed version control system; where GitHub works with Git. But I love to use TortoiseHg (instead of TortoiseGit or GitGui), and want to keep my project in GitHub.

So, I configured TortoiseHg (File>Settings>Extensions>hggit) and was able to push a test project to GitHub (following this wonderful blog). But later when I tried to push a C# MVC project with it, situation changed. It nicely starts pushing, then asks for authentication, & then shows this error-

An existing connection was forcibly closed by the remote host

Here is what shown in the log-

% hg push git+https://github.com/MinhasKamal/MVCPracticeWork pushing to git+https://github.com/MinhasKamal/MVCPracticeWork http authorization required for https://github.com/MinhasKamal/MVCPracticeWork/info/refs realm: GitHub searching for changes adding objects URLError: [Errno 10054] An existing connection was forcibly closed by the remote host [command returned code 255 Thu Feb 04 16:17:02 2016] 

I don't understand- why this error is happening. Is this a problem of GitHub or TortoiseHG, or I did something wrong? How it can be solved?


Edit 1: I am able to push to the repository but only by 'not adding' some specific directories to my repository. Is it any file type or name that is making this error?


Edit 2: The problem again happened with me, this time with a Java project. Everything was fine, till I added a *.jar file in the repository. I made a commit, but when I tried to push it to the GitHub, TortoiseHg showed me the same message. I removed the *.jar, committed, and tried to push again, but couldn't.

Now, I did again that I did before (Edit 1)- I pulled the whole repository from GitHub to another folder, replaced changed files from the current repository at my PC (did not add the *.jar), committed, and pushed; I was successful this time. So, this time the *jar file was not added to the version control database, that is why it worked.

2 Answers

Answers 1

  • I can't see any pushes to MinhasKamal/MVCPracticeWork: This repository is empty.
  • You can automate pushing process (no handwork, no timeouts, no input errors) using [auth] section in .hgrc of this repo (define username and password in it)
  • At least some initial test-pushes will be better to perform in pure CLI (more informative and readable output)

Answers 2

There is a problem with Github if you trying to add a super large file into any repo. Even though i don't know if that's your problem.

I had a change to commit with both HG and Git on my Mac and try to push it to github. Git shown me the file is too large message when I ran git push but HG only shown me push failed.

If your .jar or any of the file you added cause the problem, you can check if the file size excess the limit (from github) and this one

If You Enjoyed This, Take 5 Seconds To Share It

0 comments:

Post a Comment