0

So I've been working at getting a Windows 2008 EC2 instance up and running, along with git as a remote repository to push my project to the server live. Here are the steps I've followed:

  1. Create Windows EC2
  2. Install git & cygwin (with openssh)
  3. Add the required ports, firewall exceptions.

At this point, I can SSH into my server remotely and init repo's just fine. I'm now using this blog post to setup my remote repository. Followed these steps:

Locally:

  1. git clone project from another source
  2. git remote add production ssh://[USER]@[SERVER]/oneplant.git

Remotely:

  1. create the post-receive hook and chmod it with +x:

    #!/bin/sh
    GIT_WORK_TREE=C:/inetpub/wwwroot git checkout -f
    

Lastly, I call git push production +master:refs/heads/master locally and login, it returns with this command:

    git: '/oneplant.git' is not a git command. See 'git --help'
    fatal: The remote end hung up unexpectedly

I've been trying to search the web for this but I'm not exactly sure what I've done wrong, hopefully someone can lead me in the right direction.

mihok
  • 629
  • 1
  • 5
  • 10
  • A shot in the dark here: Try `git remote -v` to see if the remote was added with the correct URL. If not, try removing it (`git remote rm production`), and then add it again with double-quotes around the URL: `git remote add production "ssh://[USER]@[SERVER]/oneplant.git"` – Mike Morearty Jun 18 '12 at 23:34
  • Thanks @MikeMorearty, unfortunately it seems to have the correct path, I tried removing/adding it with double quotes again and still receiving the same error. Is there a git log that is kept? would be useful seeing what command sent actually caused the error. – mihok Jun 19 '12 at 02:44
  • http://stackoverflow.com/q/2736862/179675 seems very similar, and has some magic incantations to fix. I'm not posting this as an answer because it's just another shot in the dark. – Mike Morearty Jun 19 '12 at 05:12
  • I've also tried to do it in a different repository completely just in case the oneplant.git folder caused some weird behaviour, removing the .git does nothing and I still get the error... for some reason its thinking anything after the server (IP in this case) is trying to be a git command :/ hmmmm – mihok Jun 19 '12 at 15:22

0 Answers0