ubuntu在Windows服务器上克隆git存储库

时间:2015-02-05 15:37:35

标签: git ubuntu ssh msysgit

使用Windows 2008 R2 64位,我安装了 msysgit &的 cygwin的即可。服务器有一个公共IP。我的应用程序的源代码在

C:\repos\eCat\Raw.git

我希望将Raw文件夹设为存储库,所以使用git bash我输入了以下命令(在Raw文件夹中):

$ git --bare init

我得到以下输出:

Initialized Empty Git repository in c:/repos/eCat/Raw.git/

我安装了 bitvise ssh服务器,并分配了一个限制为 repos 文件夹的限制的Windows本地服务器&测试了从ubuntu到Windows服务器的ssh连接,它按预期工作。

现在我想从我的ubuntu设备上的Windows服务器远程下载源代码并对其进行处理,然后提交&将更改推送回服务器。

我不知道应该在终端中运行什么来获取源代码,例如:

git clone ssh://username@remoteServerIp:path/to/source/code???

我很擅长使用git而且我已经遵循了这方面的教程,但现在我被卡住了。任何形式的解释或帮助将不胜感激。

提前致谢。

编辑我尝试了以下内容(不确定是否正确)

git clone ssh://git@79.143.84.170/~/c/repos/eCat/Raw

并收到以下错误:

'sh' is not recognized as an internal or external command,
operable program or batch file.
fatal: The remote end hung up unexpectedly

是不是cygwin应该在windows上处理sh文件?

0 个答案:

没有答案