Logo Questions Linux Laravel Mysql Ubuntu Git Menu
 

Cannot git clone to VMWare shared folder

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?

like image 567
Toby Avatar asked Oct 28 '15 13:10

Toby


1 Answers

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.

like image 90
bacongravy Avatar answered Sep 30 '22 06:09

bacongravy