0

Possible Duplicate:
GIT: clone works, remote push doesn’t. Remote repository over copssh

I cloned a git repo over ssh. After some work it now worked.

git clone "ssh://user@server.com/repo.git"

But now, when I try to push to the server (which is mine)

git push origin  master

I get the error:

git: '/repo.git' is not a git command. See 'git --help'.

fatal: The remote end hung up unexpectedly

The repo is installed on windows with COPSSH and msysgit. Any ideas? Thank you!

Community
  • 1
  • 1
melbic
  • 11,988
  • 5
  • 33
  • 37

2 Answers2

3

Open .git/config file and see what is set for url under [remote "origin"]. If it is not the correct url, point it to the ssh://user@server.com/repo.git. From the error message, it looks like the url is not setup properly.

manojlds
  • 290,304
  • 63
  • 469
  • 417
1

Solved it. One has to change the config file:

git config --global remote.origin.receivepack "git receive-pack"

As written here: GIT: clone works, remote push doesn't. Remote repository over copssh

Now it works like a charme!

Community
  • 1
  • 1
melbic
  • 11,988
  • 5
  • 33
  • 37