Windows上的git clone [英] git clone on windows
问题描述
我在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?
推荐答案
如果您已按照教程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/
您将在"
Using Openssh rather than plink.exe is easier though: see "Setting up a Git server with Windows Server 2008". OP JohnZ 在评论中提到: 看起来像这样取决于您使用的ssh服务器. Looks like this depends a little bit on the ssh server you use.
这篇关于Windows上的git clone的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!
我安装了CYGWIN,该计算机已安装了openSSH.
要克隆它,我这样做:
I installed CYGWIN, which has openSSH installed.
To clone it, I did this: git clone "ssh://root@192.168.1.1/cygdrive/c/Program Files (x86)/Apache Software Foundation/Apache2.2/htdocs/myrepofolder"