Logo Questions Linux Laravel Mysql Ubuntu Git Menu
 

Git push origin master returns Error cannot spawn ... why?

I'm trying to use GitHub for the first time, but after many issues trying to get the authentication right, I've managed to authenticate with [email protected] and created a repo, but when i try "git push origin master" i get the following error:

$ git push origin master
error: cannot spawn : No such file or directory
fatal: unable to fork

I cant find any reason for the error or any explanation in the trouble shooting pages, can anyone suggest why it may be that I get that error.

I have already specified/added the remote path as follows:

$ git remote add origin [email protected]:christopherdebeer/yUML-Diagram.git

please help.

Also this is all on a windows 7 machine running mysysgit (1.7.0.2) and using git bash.

re: Issue 313, a space in the GIT_SSH variable, cant be the problem mine is as follows:

$GIT_SSH="c:/putty/plink.exe"
like image 412
Christopher Avatar asked Jun 22 '10 22:06

Christopher


People also ask

Why is git push origin master not working?

If git push origin master not working , all you need to do is edit that file with your favourite editor and change the URL = setting to your new location. Assuming the new repository is correctly set up and you have your URL right, you'll easily be able to push and pull to and from your new remote location.

How do I fix error failed to push some refs to Origin?

We can fix the error: failed to push some refs to [remote repo] error in Git using the git pull origin [branch] or git pull --rebase origin [branch] commands. In most cases, the latter fixes the error.

How do you push origin master?

Whenever we need to push the changes to a remote repository, we use git push along with the remote repository “origin” and “master” branches. The term used is “git push origin master“. To pull the changes from the remote repository to local, we use git pull along with remote repository “origin” and “master” branch.

What does mean in git push origin master?

With git push origin master you tell git to push all of the commits in the currently checked out local branch (i.e. from your file system) to the remote repo identified by the name origin on its remote branch named master .


1 Answers

That reminds me of issue 313, where GIT_SSH environment variable contains spaces in its path.

Other than that, did you followed the GitHub Help page and checking if your ssh connection worked?

$ ssh [email protected]
The authenticity of host 'github.com (207.97.227.239)' can't be established.
RSA key fingerprint is 16:27:ac:a5:76:28:2d:36:63:1b:56:4d:eb:df:a6:48.
Are you sure you want to continue connecting (yes/no)? yes
Warning: Permanently added 'github.com,207.97.227.239' (RSA) to the list of known hosts.
ERROR: Hi tekkub! You've successfully authenticated, but GitHub does not provide shell access
Connection to github.com closed.
like image 179
VonC Avatar answered Oct 05 '22 21:10

VonC