views:

1242

answers:

2

I have a git branch on my production server which is centos. I am trying to connect to it from tortoisegit on my windows machine but it doesn't seem to be working.

I install msysgit, tortoisegit and already have putty. once installed i created a folder on desktop, right clicked, then clicked on Git Clone..., put the remote server's username and domain name in the url box ([email protected]), then the directory on the desktop in the directory box. when i click OK, it shows:

git.exe clone -v "[email protected]" "C:\.......testdir\domain.com"
fatal: '[email protected]'does not appear to be a git repository` 
Initialized empty Git repository in C:\.......testdir\domain.com\.git\ 
fatal: The remote end hung up unexpectedly

I've tried with just domain.com, username@ip_address, ip_address, domain.com/public_html/.git, and many other variants but it just doesn't seem to work.

Am I doing something wrong here?

A: 

I suspect that the path you are stating in the command is wrong. Try:

git clone -v "[email protected]/full/path/to/public_html" "C:\...\testdir\domain.com"
Alan Haggai Alavi
you forgot the : between domain.com and the full path.
Jeremy Wall
No. It is not needed.
Alan Haggai Alavi
+1  A: 

git.exe clone -v [email protected]:full_path_to_dot_git_directory "C:.......testdir\domain.com"

you have to tell git exactly where on the centos servers drives the git repository exists. Assuming you are using ssh for the protocol.

If you prefer to use http instead then you have to configure a web server on your server that serves up the .git directory and point to http://domain.com/path/to/dot/git/directory that you defined in your server configuration.

Jeremy Wall