【问题标题】:TortoiseGit connect to remote git repo (not github)TortoiseGit 连接到远程 git repo(不是 github)
【发布时间】:2010-12-13 16:39:12
【问题描述】:

我的生产服务器 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 和许多其他变体,但它似乎不起作用。

我在这里做错了吗?

【问题讨论】:

  • 它适用于冒号:非常感谢

标签: git msysgit tortoisegit


【解决方案1】:

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

【讨论】:

    【解决方案2】:

    我怀疑您在命令中说明的路径是错误的。试试:

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

    【讨论】:

    • 您忘记了 domain.com 和完整路径之间的 :。
    猜你喜欢
    • 1970-01-01
    • 1970-01-01
    • 2011-05-13
    • 1970-01-01
    • 1970-01-01
    • 2012-01-06
    • 2013-11-06
    • 2016-10-01
    • 1970-01-01
    相关资源
    最近更新 更多