本文介绍了Windows上的git clone的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!

问题描述

我在Windows Server 2008上安装了SSH服务器,并初始化了git repo.

I have installed an SSH server on Windows Server 2008, and initialized a git repo.

我想在我的开发环境中克隆它,以便我可以提交和推送更改.

I'd like to clone this on my dev environment, so that I can commit and push changes.

难以弄清路径;这是我在每个示例中看到的:

Having trouble figuring out the path; here's what I see in every example:

home$ git clone ssh://myuser@server/path/to/repository

那太好了,但是我不知道如何在Windows中使用它.这对我来说似乎是错误的:

That's great and all, but I don't understand how to use that for windows. This seems wrong to me:

home$ git clone ssh://myuser@server/Program Files (x86)/Apache/Apache/htdocs/myrepo

该路径在Windows中如何真正起作用?

How does the path really work in windows?

推荐答案

如果您已按照教程在Windows上使用copSSH设置Msysgit服务器,我确认您的"Program Files (x86)"可以正常工作.

If you have followed the tutorial Setting up a Msysgit Server with copSSH on Windows, I confirm your "Program Files (x86)" can work.

例如,请参见"使用ssh的Git克隆-找不到存储库":

git clone "ssh://steve@test:4837/Program Files (x86)/ICW/home/steve/vc/git/depo/test.git"
          /c/dev/es/app/

您将在"".

使用Openssh而不是plink.exe更容易:请参阅"使用Windows Server 2008设置Git服务器".

Using Openssh rather than plink.exe is easier though: see "Setting up a Git server with Windows Server 2008".

OP JohnZ 在评论中提到:

git clone "ssh://root@192.168.1.1/cygdrive/c/Program Files (x86)/Apache Software Foundation/Apache2.2/htdocs/myrepofolder"

这篇关于Windows上的git clone的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持!

09-05 19:00
查看更多