views:

208

answers:

2

ssh: Could not resolve hostname C: hostname nor servname provided, or not known fatal: The remote end hung up unexpectedly ?

ive set up a git repo useing --bare ( i even dont know what it mean ) im following the http://stackoverflow.com/questions/1960799/using-gitdropbox-together-effectively and when i do

$ git clone C:\Users\DAMS\Documents\My Dropbox\Projects\RED.git

or

$ git clone C:/Users/DAMS/Documents/My Dropbox/Projects/RED.git

even this ( diffrent error )

$ git clone /C/Users/DAMS/Documents/My Dropbox/Projects/RED.git
fatal: Could not switch to '/C/Users/DAMS/Documents': No such file or directory

it somehow give me a error. ( btw im useing cygwin on windows )

Thanks

Adam Ramadhan

+1  A: 

the colon is used to separate hostname from the path.

i believe in cygwin you can say: /c/users/DAMS/…

 $ git clone '/c/Users/DAMS/Documents/My Dropbox/Projects/RED.git'
knittl
$ git clone /c/Users/DAMS/Documents/My Dropbox/Projects/RED.gitfatal: Could not switch to '/c/Users/DAMS/Documents': No such file or directory :| , anyway thanks for the replay
Adam Ramadhan
@Adam: You have to either quote the entire argument, or escape the spaces with `\`
Hasturkun
That should have been a backslash, strange.
Hasturkun
+2  A: 

try:

$ git clone "/cygdrive/c/Users/DAMS/Documents/My Dropbox/Projects/RED.git"

You're not escaping the space in "My Dropbox", which splits the content into multiple argunemts to git. using the c: specification causes it to use ssh to access a host called 'c'

Petesh
done thanks!!. man people should know about this :)
Adam Ramadhan