Git推/拉路径不工作到Windows源运行msysgit + cygwin sshd [英] Git push/pull paths not working to windows origin running msysgit + cygwin sshd
问题描述
尝试解决我遇到的问题:使用git在Windows上管理网站,我在Windows 2008服务器上安装了Cygwin openssh和Git for Windows(msysgit)(让我们称之为 myserver
)。
In trying to resolve the issue I was having for: managing website on windows using git, I installed Cygwin openssh and Git for Windows (msysgit) on a Windows 2008 server (let's call this myserver
).
我在cygwin路径 /var/git/example.git
下有一个裸的git仓库,它映射到 c: \cygwin\var\git\example.git
在Windows上。
I have a bare git repo setup at the cygwin path /var/git/example.git
, which maps to c:\cygwin\var\git\example.git
on Windows.
我有一个用户 git
I have a user git
that has permission on the repo's folders.
我可以使用 git
登录
我可以在Putty中使用cygwin风格的路径,例如 cd / var / git / example
I am able to use cygwin style paths in Putty, so for example cd /var/git/example.git
gets me to my bare repo.
但是,当我使用Git Bash(MingW32)时,我有一个问题,并尝试做:
However, I have a problem when I use Git Bash (MingW32) and attempt to do:
git clone ssh://git@myserver/var/git/example.git
我得到回应:
Cloning into example...
fatal: '/var/git/example.git' does not appear to be a git repository
fatal: The remote end hung up unexpectedly
当我尝试:
git clone ssh://git@myserver:c:/cygwin/var/git/example.git
工作和repo克隆。
Cloning into example...
remote: Counting objects: 384, done.
remote: Compressing objects: 100% (288/288), done.
remote: Total 384 (delta 85), reused 359 (delta 73)
Receiving objects: 100% (384/384), 51.72 MiB | 201 KiB/s, done.
Resolving deltas: 100% (85/85), done.
但是,如果我尝试使用:
However, if I then try to push using:
cd example
git push
它失败:
git: '/cygwin/var/git/example.git' is not a git command. See 'git --help'.
fatal: The remote end hung up unexpectedly
可以推/拉/克隆?理想情况下,我想要能够使用Cygwin路径样式,例如。 git clone ssh://git@myserver/var/git/example.git
。
So how do I make this work so I can push/pull/clone? Ideally I would like to be able to use the Cygwin path style, eg. git clone ssh://git@myserver/var/git/example.git
.
推荐答案
Dunno如果这个问题已经解决了,但是我终于成功了,并且在另一个线程上分享了我的回答:
Dunno if this was resolved, but I have finally succeeded in getting this to work and have shared my answer on the other thread:
http://stackoverflow.com/a/10509588
这篇关于Git推/拉路径不工作到Windows源运行msysgit + cygwin sshd的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!