简体   繁体   English

TortoiseGit连接到远程git仓库(不是github)

[英]TortoiseGit connect to remote git repo (not github)

I have a git branch on my production server which is centos. 我的生产服务器上有一个git分支,它是centos。 I am trying to connect to it from TortoiseGit on my windows machine but it doesn't seem to be working. 我试图从我的Windows机器上的TortoiseGit连接它,但它似乎没有工作。

I install msysgit, TortoiseGit and already have putty. 我安装了msysgit,TortoiseGit并且已经有了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. 一旦安装我在桌面上创建了一个文件夹,右键单击,然后单击Git Clone ...,将远程服务器的用户名和域名放在url框中(username@domain.com),然后将目录放在桌面上的目录中框。 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. 我尝试过只使用domain.com,用户名@ ip_address,ip_address,domain.com/public_html/.git和许多其他变种,但它似乎没有用。

Am I doing something wrong here? 我在这里做错了吗?

git.exe clone -v username@domain.com:full_path_to_dot_git_directory "C:.......testdir\\domain.com" 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. 你必须告诉git gos存储库存在gos存储库的确切位置。 Assuming you are using ssh for the protocol. 假设您使用ssh作为协议。

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. 如果您更喜欢使用http,那么您必须在服务器上配置一个提供.git目录的Web服务器,并指向您在自己定义的http://domain.com/path/to/dot/git/directory服务器配置。

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"

声明:本站的技术帖子网页,遵循CC BY-SA 4.0协议,如果您需要转载,请注明本站网址或者原文地址。任何问题请咨询:yoyou2525@163.com.

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