Cannot Clone GIT Repository from windows server but can SSH

I have a seen a lot of posts related to the error I am getting but can’t find anything that seems like a potential fix I would like to try without getting feedback from some people who know better.

The Setup: I recently built a Windows 7 PC and installed Apache, PHP and MySQL. Everything is working great with my setup and I opened the server up to other devices on the LAN. When I go to a browser and navigate to IPADDRESS:PORT (Installed Apache to listen on a custom port to avoid potential conflicts (Skype, future IIS install?, etc) I get my htdocs index.php page. Great so far.

  • Git unmerged paths
  • How do I add files without dots in them (all extension-less files) to the gitignore file?
  • error: waitpid for C:\Program Files (x86)\PuTTY\plink.exe failed: No child processes
  • Is there a way to see how many lines of code were written by an author in Git by directory?
  • git svn clone except a particular folder
  • How do I merge locally a master and a fork in git?
  • The last thing I wanted to do was setup Git so that I can do work for my server on my Macbook Pro and push changes to the server. To get this up and running I installed msysgit on my server and was able to create a Git repository for a Media directory I created at the root of my server. When I open this directory up in Explorer I can see the .git directory. The next thing I did was install OpenSSH on the server and I got that up and running. I also changed the default home directory of an SSH connection to the htdocs folder of my Apache server.

    Now when I move over to my Macbook pro to test the setup and I am getting problems.

    SSH seems to be functioning as expected. When I am on my laptop and run ssh USERNAME@IPADDRESS I get the message to enter my password, I enter my login password and awesome I am in the shell of my server at the htdocs directory.

    Git does not seem to be functioning as easily though. I have Git on my Macbook Pro and was able to create a repository in a local directory no problem. When I navigate to a new directory in Terminal that I would like to work with the Media folder project I created on the server and run the following Git commands:

    git clone USERNAME@IPADDRESS:/Media
    git clone USERNAME@IPADDRESS:\Media
    git clone USERNAME@IPADDRESS:/Media.git
    git clone USERNAME@IPADDRESS:/Media/.git


    (Not sure what exact command I’m supposed to be running. Do I need .git at the end of this command? I see a hidden .git directory in the Media directory but I don’t see a Media.git file.)

    I get the following error:

    Received disconnect from IPADDRESS: 2: fork failed: Resource temporarily unavailable
    fatal: The remote end hung up unexpectedly

    Based on my searching I can’t tell if this error is coming from my client (Macbook Pro) or server. I read that it could be a threading limit set on my Macbook so I entered the following commands and upped my maxprocperuid:

    sudo sysctl -a|grep maxprocperuid (which outputted 709)
    sudo sysctl -w kern.maxprocperuid=3000 (upped it to ridiculous number to see if it was the problem)

    But I am still getting the error when trying to clone the repository.

    If you’ve gotten to the end of this thanks, just trying to provide as much info as possible and any help would really be appreciated.


  • Developing & deploying Rails app from same machine
  • File Level Tracking In Git (Files from multiple branches in same directory)
  • Is it possible to dynamically generate git log format?
  • git - can't push to remote, error 'fatal: Not a git repository'
  • Mac specific optimizations in ~/.gitconfig
  • Check who pushed a Git commit
  • 2 Solutions collect form web for “Cannot Clone GIT Repository from windows server but can SSH”

    Try uninstalling OpenSSH and then installing WinSSHD again. Check out this link which suggests the same.

    Also, this question might be of some help to you while you are at it.

    Git doesn’t use ssh by default so you have to specify it when cloning

    git clone ssh://[username]@[ip-address]:[port][/path/to/repo]
    Git Baby is a git and github fan, let's start git clone.