<html>
<head>
<meta http-equiv="content-type" content="text/html; charset=UTF-8">
</head>
<body text="#000000" bgcolor="#FFFFFF">
<p>hello CMake community,</p>
<p><br>
</p>
<p>I am using a private git repository with SSH URL with two
different git remote server. The repository on github is using an
git submodule on bitbucket. <br>
</p>
<p><br>
</p>
<p><i>include( ExternalProject )</i><i><br>
</i><i><br>
</i><i>ExternalProject_Add(test</i><i><br>
</i><i> GIT_REPOSITORY <a class="moz-txt-link-abbreviated" href="mailto:git@github.com:myuser/myprivaterepo.git">git@github.com:myuser/myprivaterepo.git</a></i><i><br>
</i><i> GIT_REMOTE_NAME origin</i><i><br>
</i><i>)</i><br>
</p>
<p><br>
</p>
<p>1. Cloning the repository 'origin/master' is successful</p>
<p>2. Cloning into the submodule fails: it is unable to check out a
git commit</p>
<p>3. To test my SSH connection I tried above CMake commands cloning
solely the submodule, which is successful (see below with
different URL)<br>
</p>
<p><br>
</p>
<p><i>include( ExternalProject )</i><i><br>
</i><i> </i><i><br>
</i><i>
ExternalProject_Add(test</i><i><br>
</i><i>
GIT_REPOSITORY <a class="moz-txt-link-abbreviated" href="mailto:git@bitbucket.org:myusername/mysubmodule.git">git@bitbucket.org:myusername/mysubmodule.git</a></i><i><br>
</i><i>
GIT_REMOTE_NAME origin</i><i><br>
</i><i>
)</i><br>
</p>
<p><br>
</p>
<p>The complete error message from first example is given below:<br>
</p>
<p><br>
<br>
Scanning dependencies of target test<br>
[ 12%] Creating directories for 'test'<br>
[ 25%] Performing download step (git clone) for 'test'<br>
Cloning into 'test'...<br>
Already on 'master'<br>
Your branch is up-to-date with 'origin/master'.<br>
Submodule 'mysubmodule'
(<a class="moz-txt-link-abbreviated" href="mailto:git@bitbucket.org:myusername/mysubmodule.git">git@bitbucket.org:myusername/mysubmodule.git</a>) registered for path
'mysubmodule'<br>
Cloning into 'mysubmodule'...<br>
fatal: reference is not a tree: 6a0b950ed42ce225cc2df0<br>
Unable to checkout '6a0b950ed42ce225cc2df0' in submodule path
'mysubmodule'<br>
CMake Error at
/home/user/testing/build/test-prefix/tmp/test-gitclone.cmake:49
(message):<br>
Failed to update submodules in:<br>
'/home/user/testing/build/test-prefix/src/test'</p>
<p><br>
</p>
<p>How can I use the repository with submodules?</p>
<p><br>
</p>
<p>thank you<br>
</p>
</body>
</html>