FetchContent git+ssh hangs in Xcode generator
If a project requires an ssh key to clone the repository, FetchContent will hang during the populate phase.
This is for private repo, so switching to using https is not an option.
I'm assuming the the shell used to do the cloning pretends to be interactive when it is not.
Steps to reproduce
ssh-add -D # wipe the saved keys cmake -GXcode -Bxcode -S. -DFETCHCONTENT_QUIET=OFF
echo "Performing download step (git clone) for 'cmake-populate'" Performing download step (git clone) for 'cmake-populate' cd /var/folders/xb/j3tqclz55zq6vnc2vb1g9gk80000gn/T/tmp.izJR4dVfaS/xcode/_deps && /usr/local/Cellar/cmake/3.15.4/bin/cmake -P /private/var/folders/xb/j3tqclz55zq6vnc2vb1g9gk80000gn/T/tmp.izJR4dVfaS/xcode/_deps/cmake-subbuild/cmake-populate-prefix/tmp/cmake-populate-gitclone.cmake Cloning into 'cmake-src'... <hangs-here>
Full output is here: output.txt
Like Makefile generator (and probably others), I expect to be asked for a passphrase on the
Making sure that no interactive prompts appear during the process will make it work.
ssh-add ssh email@example.com # make sure host is known to ssh cmake -GXcode -Bxcode -S. -DFETCHCONTENT_QUIET=OFF