1

I created one Git server on Win7 with SSHD held by WinSSH,

i built remote git there with syntax

ssh user@128.21.33.5
cd GitRepo/GitCRM/
git --bare init
exit

i can do scp with syntax

scp myFile user@128.21.33.5:GitRepo/GitCRM/

but i always got failed when do this:

git push user@128.21.33.5:GitRepo/GitCRM/ master

error message is :

fatal : ''GitRepo/GitCRM/'' does not appear to be a git repository
fatal : the remote end hung up enexpectedly

what should i fix?

== UPDATE == i install cygwin within openSSH to work as my new SSH server and all work fine

kreamik
  • 530
  • 2
  • 8
  • 22

1 Answers1

1

Even if ssh connects to your HOME, git might still need the full path:

git push user@128.21.33.5/home/YourLogin/GitRepo/GitCRM/ master

(and you are right to use GitCRM here, not GitCRM.git: since you have created a bare repo within GitCRM/, that directory is its own '.git')


Regarding SSH server, the OP kreamik went with an OpenSSH with Cygwin, easier to setup than a WinSSH.

Community
  • 1
  • 1
VonC
  • 1,042,979
  • 435
  • 3,649
  • 4,283
  • i install winSSH in my windows and i don't know what is my home .. any clue? i test with C:/ or C:\ to my folder and it always give me error like i mention before .. it seems that the path has generate it's own quote and it become double quote that makes it failed – kreamik Nov 16 '12 at 08:00
  • You don't need WinSSH, and `HOME` isn't defined by default on Windows. Define it wherever you have stored your ssh keys. See here (http://stackoverflow.com/questions/3454774/fix-msysgit-portable-home-location/3455231#3455231) how msysgit defines `HOME` for instance. As illustrated in http://stackoverflow.com/a/8562715/6309, you can set `HOME` to any directory you want. – VonC Nov 16 '12 at 08:03