无法将克隆克隆到VMWare共享文件夹

Tob*_*oby 33 git vmware-fusion

今天早上奇怪的问题 - 我无法使用SSH或HTTPS从GitHub上的公共仓库克隆到我的共享VMWare文件夹.我正在使用Fedora 22,如果我在除共享文件夹之外的系统上的任何地方尝试此命令,它的工作完美.

git clone https://github.com/twbs/bootstrap.git
Cloning into 'bootstrap'...
fatal: 'origin' does not appear to be a git repository
fatal: Could not read from remote repository.

Please make sure you have the correct access rights
and the repository exists.
Run Code Online (Sandbox Code Playgroud)

我试过的步骤:

  • 重新启动VM并托管Mac(运行El Capitan)
  • 重新安装git
  • 检查权限(drwxr-xr-x)

有谁知道为什么共享文件夹可能导致这个?

bac*_*avy 7

我有同样的问题.我相信这可能是因为VMWare共享文件夹文件系统不能正确支持所有文件系统操作.例如,您无法创建硬链接:

$ touch foo
$ ln foo bar
ln: bar: Operation not supported
Run Code Online (Sandbox Code Playgroud)

...而且你不能复制符号链接:

$ touch foo
$ ln -s foo bar
$ cp -R bar baz
cp: bar: could not copy extended attributes to baz: Invalid argument
Run Code Online (Sandbox Code Playgroud)

此外,一旦git克隆失败,结帐的文件名永远不会再次使用:

$ git clone https://github.com/twbs/bootstrap.git
Cloning into 'bootstrap'...
[...]
fatal: index-pack failed
$ touch bootstrap
touch: bootstrap: Input/output error
Run Code Online (Sandbox Code Playgroud)

其他人已经注意到VMWare共享文件夹中的硬链接git clone的问题.没有人找到解决方案.

通过将磁盘映像保存到共享文件夹,将磁盘映像挂载到guest虚拟机,然后git-cloning到挂载的文件系统中,我在使用OS X guest虚拟机时解决了这个问题.一个类似的技术可以在Linux下工作,但我还没有尝试过.