'fatal: remote part of refspec is not a valid name in ..' error when setting up Git

3.8k views Asked by At

I'm trying to setup git with WPengine following the instructions here: (http://wpengine.com/git/#production) - but when I get down to the deploy step, I get the following error:

% git remote -v  
production  [email protected]:production/workshop-wp.git (fetch)
production  [email protected]:production/workshop-wp.git (push)
% git push production master ...
fatal: remote part of refspec is not a valid name in ...
2

There are 2 answers

0
user1406947 On

I got it to work. I was trying to deploy my GitHub repo name:

$ git remote add production [email protected]:production/my_wordpress_app.git

Instead of deploying my wpengine username

$ git remote add production [email protected]:production/robertwilliams.git
2
AudioBubble On

Don't put ... in the push command. The correct syntax is

git push production master

I know that the instructions in the tutorial that you linked to say to do this:

git push production master ...

but that's just blatantly incorrect.