无法克隆到VMWare共享文件夹 [英] Cannot git clone to VMWare shared folder

查看:1269
本文介绍了无法克隆到VMWare共享文件夹的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!

问题描述

今天早上奇怪的问题 - 我无法通过SSH或HTTPS将克隆从GitHub上的公共库复制到我的共享VMWare文件夹。我正在使用Fedora 22,如果我在共享文件夹以外的系统上的任何位置尝试此命令,它都可以正常工作。

  git clone https://github.com/twbs/bootstrap.git 
克隆到'bootstrap'中...
致命:'origin'看起来不是git存储库
致命:无法从远程存储库读取。

请确保您拥有正确的访问权限
并存在存储库。

我试过的步骤:


  • 重新启动虚拟机和主机Mac(运行El Capitan)
  • 重新安装git

  • 检查权限(drwxr-xr-x)



有谁知道为什么共享文件夹可能会导致这种情况?

解决方案

我有同样的问题。我认为这可能是因为VMWare共享文件夹文件系统不能正确支持所有的文件系统操作。例如,你不能创建一个硬链接:

  $ touch foo 
$ ln foo bar
ln: bar:不支持的操作

...并且您无法复制符号链接:

  $ touch foo 
$ ln -s foo bar
$ cp -R bar baz
cp:bar:could不复制扩展属性到baz:无效参数

此外,一旦git克隆失败,文件名

  $ git clone https://github.com/twbs/bootstrap.git 
克隆到'bootstrap'中...
[...]
致命:索引包失败
$触发bootstrap
触发:bootstrap:输入/输出错误

其他人已注意到硬链接 g它在VMWare共享文件夹中克隆。没有人找到解决方案。

在使用OS X guest虚拟机时,我已经解决了这个问题,方法是将磁盘映像保存到共享文件夹,将磁盘映像挂载到guest虚拟机,然后将git克隆到安装的文件系统中。 类似的技术可能在Linux中工作,但我没有尝试过。


Weird problem this morning - I'm not able to git clone from a public repo on GitHub to my shared VMWare folder with either SSH or HTTPS. I'm working on Fedora 22, and if I try this command anywhere on the system other than the shared folder, it works perfectly.

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.

Steps I have tried:

  • Rebooting VM and host Mac (running El Capitan)
  • Reinstalling git
  • Checking permissions (drwxr-xr-x)

Does anyone have any idea why the shared folder might be causing this?

解决方案

I have the same issue. I believe this may be because the VMWare shared folder filesystem does not support all filesystem operations properly. For instance, you cannot create a hardlink:

$ touch foo
$ ln foo bar
ln: bar: Operation not supported

... and you cannot copy a symlink:

$ touch foo
$ ln -s foo bar
$ cp -R bar baz
cp: bar: could not copy extended attributes to baz: Invalid argument

Furthermore, once the git clone fails, the filename of the checkout can never be used again:

$ git clone https://github.com/twbs/bootstrap.git
Cloning into 'bootstrap'...
[...]
fatal: index-pack failed
$ touch bootstrap
touch: bootstrap: Input/output error

Others have noticed the issues with hardlinks and git clone in VMWare shared folders. Nobody has found a solution.

I have worked around this issue when using an OS X guest by saving a disk image to the shared folder, mounting the disk image in the guest, and then git-cloning into the mounted filesystem. A similar technique may work in Linux, but I haven't tried it.

这篇关于无法克隆到VMWare共享文件夹的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!

查看全文
登录 关闭
扫码关注1秒登录
发送“验证码”获取 | 15天全站免登陆