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
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
index.php page. Great so far.
- Bash in Git for Windows: Weirdness when running a command with CMD.exe /C with args
- Synchronizing Visual SVN with IIS for web development (or to any other folder)
- How do I implement the Post Commit Hook with Trac & SVN in a Windows Environment?
- Can't clone on windows but can clone on linux from Gitlab server
- how to change gitconfig location?
- Git, Can't clone repo on windows
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
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
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.
2 Solutions collect form web for “Cannot Clone GIT Repository from windows server but can SSH”
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]