乌龟Git连接到远程Git仓库(非GitHub)

3
我在我的CentOS生产服务器上有一个git分支。我尝试从我的Windows机器上的TortoiseGit连接到它,但似乎无法正常工作。
我安装了msysgit、TortoiseGit并已经拥有putty。一旦安装完成,我在桌面上创建了一个文件夹,右键单击,然后点击Git Clone...,在url框中放置远程服务器的用户名和域名(username@domain.com),然后在目录框中放置桌面上的目录。当我单击确定时,它显示:
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

我尝试过只使用domain.com、username@ip_address、ip_address、domain.com/public_html/.git以及许多其他变体,但似乎都不起作用。这里我做错了什么吗?
2个回答

0

我怀疑你在命令中指定的路径是错误的。请尝试:

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

你忘记在domain.com和完整路径之间加上冒号了。 - Jeremy Wall

0

git.exe clone -v username@domain.com:full_path_to_dot_git_directory "C:.......testdir\domain.com"

你必须告诉 git 在 CentOS 服务器驱动器的哪个位置存在 git 存储库。假设您使用 ssh 协议。

如果您更喜欢使用 http,则必须在服务器上配置一个 Web 服务器,以提供 .git 目录,并指向您在服务器配置中定义的 http://domain.com/path/to/dot/git/directory


链接无效 - Shawking

网页内容由stack overflow 提供, 点击上面的
可以查看英文原文,
原文链接