I'm running a Ubuntu 14.04 VM in VMWare Fusion (host machine El Capitan OS x). I've set up shared folders between the host and VM. In a shared folder if I try to git clone
any remote repo, git seems to ignore the remote repo, and exits with an error:
$ GIT_TRACE=1 git clone git@github.com:example/example.git
trace: built-in: git 'clone' 'git@github.com:example/example.git'
Cloning into 'example'...
trace: run_command: 'git-upload-pack '\''origin'\'''
trace: exec: '/bin/sh' '-c' 'git-upload-pack '\''origin'\''' 'git-upload-pack '\''origin'\'''
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.
Running the same command in a non-shared folder on the VM works correctly:
$ GIT_TRACE=1 git clone git@github.com:example/example.git
trace: built-in: git 'clone' 'git@github.com:example/example.git'
Cloning into 'example'...
trace: run_command: 'ssh' 'git@github.com' 'git-upload-pack '\''example/example.git'\'''
trace: run_command: 'index-pack' '--stdin' '-v' '--fix-thin' '--keep=fetch-pack 6567 on dev' '--check-self-contained-and-connected'
trace: exec: 'git' 'index-pack' '--stdin' '-v' '--fix-thin' '--keep=fetch-pack 6567 on dev' '--check-self-contained-and-connected'
remote: Counting objects: 1, done.
trace: built-in: git 'index-pack' '--stdin' '-v' '--fix-thin' '--keep=fetch-pack 6567 on dev' '--check-self-contained-and-connected'
Receiving objects: 100%
[command runs normally from here...]
There's a clear difference in the git-upload-pack
execution. For some reason it's not running SSH (I've also tried HTTPS, again the remote repo is ignored). What I can't work out is why this is happening and how to make git clone
work in the shared folder.
I've checked filesystem permissions and they are fine. I can't see why these would affect the behaviour of git clone
at this early stage (and in this way...).
My problem may be the same as this question, but there was no answer provided. The GIT_TRACE
I have run might provide more information and not using SSH seems very strange.
I have managed to set up my repo on the shared filesystem without using git clone (by cloning somewhere else, then re-using the .git/config
file), but I need to be able to git clone
directly in the folder as it's also affecting submodules & I have a lot of repos! Can anyone help?