2011-04-12 163 views
1

我已經在遠程服務器上的git repo。我有ssh訪問這臺服務器。當我嘗試用命令git clone ssh://[email protected]_addres:9022/repo.git克隆回購時,我無法克隆它。出現的錯誤是 git clone ssh://[email protected]_address:9022/repo.git Cloning into repo... fatal: '/repo.git' does not appear to be a git repository fatal: The remote end hung up unexpectedly Git遠程克隆

回答

1

如果您使用名稱login登錄該計算機並執行cd /repo.git,您會得到什麼?

你可能缺少倉庫路徑...

+0

當我輸入'git:// ip_addres/repo.git'時,一切都很好。 – 2011-04-12 20:15:05

+1

據我記得'git:'的默認端口是'9418'。另一方面,'git:'不是'ssh:'而是其他協議,所以你可以確定你的服務器已經啓動並運行了一個ssh服務器,並且它監聽你的首選端口'9022'(默認爲ssh '22')?試試'ssh nick @ ip_adress:9022' – KingCrunch 2011-04-12 20:21:23

+0

我嘗試'ssh nick @ ip_adress:9022'並開始工作。 – 2011-04-12 20:23:24

1

只是一個(合法的;))猜

git clone ssh://[email protected]_adress:9022/~nick/repo.git 

這是@Matthieu答案的結果。我不假設,你的服務器的根目錄下有一個目錄repo.git。這個答案預計,回購是在'尼克的家。

+0

沒有問題是一樣的。 – 2011-04-12 20:17:45