简体   繁体   中英

TortoiseGit connect to remote git repo (not github)

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 (username@domain.com), then the directory on the desktop in the directory box. when i click OK, it shows:

git.exe clone -v "username@domain.com" "C:\.......testdir\domain.com"
fatal: 'username@domain.com'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?

git.exe clone -v username@domain.com: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.

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

git clone -v "username@domain.com/full/path/to/public_html" "C:\...\testdir\domain.com"

The technical post webpages of this site follow the CC BY-SA 4.0 protocol. If you need to reprint, please indicate the site URL or the original address.Any question please contact:yoyou2525@163.com.

 
粤ICP备18138465号  © 2020-2024 STACKOOM.COM