2009-11-06 341 views
3

我的生產服務器上有一個git分支,它是centos。我試圖從我的Windows機器上的TortoiseGit連接到它,但它似乎並沒有工作。TortoiseGit連接到遠程git倉庫(不是github)

我安裝了msysgit,TortoiseGit並且已經有putty。一旦安裝,我在桌面上創建一個文件夾,右鍵單擊,然後單擊Git Clone ...,將遠程服務器的用戶名和域名放入url框([email protected]),然後在目錄的桌面上的目錄框。當我點擊OK,它表明:

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 

我只domain.com,用戶名@ip地址,IP_ADDRESS domain.com/public_html/.git等諸多變種嘗試,但它只是不似乎工作。

難道我做錯了什麼嗎?

+0

它使用冒號: 非常感謝你 – Dru 2009-11-06 19:49:00

回答

1

git.exe克隆-v [email protected]: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

0

我懷疑你在命令中聲明的路徑是錯誤的。嘗試:

git clone -v "[email protected]/full/path/to/public_html" "C:\...\testdir\domain.com" 
+0

你忘了:domain.com和完整路徑之間。 – 2009-11-06 02:55:32

+0

不需要。 – 2009-11-06 03:20:11