hello CMake community,

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.


/include( ExternalProject )//
//
//ExternalProject_Add(test//
//    GIT_REPOSITORY g...@github.com:myuser/myprivaterepo.git//
//    GIT_REMOTE_NAME origin//
//)/


1. Cloning the repository 'origin/master' is successful

2. Cloning into the submodule fails: it is unable to check out a git commit

3. To test my SSH connection I tried above CMake commands cloning solely the submodule, which is successful (see below with different URL)


/include( ExternalProject )//
////
//ExternalProject_Add(test//
//    GIT_REPOSITORY g...@bitbucket.org:myusername/mysubmodule.git//
//    GIT_REMOTE_NAME origin//
//)/


The complete error message from first example is given below:



Scanning dependencies of target test
[ 12%] Creating directories for 'test'
[ 25%] Performing download step (git clone) for 'test'
Cloning into 'test'...
Already on 'master'
Your branch is up-to-date with 'origin/master'.
Submodule 'mysubmodule' (g...@bitbucket.org:myusername/mysubmodule.git) registered for path 'mysubmodule'
Cloning into 'mysubmodule'...
fatal: reference is not a tree: 6a0b950ed42ce225cc2df0
Unable to checkout '6a0b950ed42ce225cc2df0' in submodule path 'mysubmodule'
CMake Error at /home/user/testing/build/test-prefix/tmp/test-gitclone.cmake:49 (message):
  Failed to update submodules in:
  '/home/user/testing/build/test-prefix/src/test'


How can I use the repository with submodules?


thank you

-- 

Powered by www.kitware.com

Please keep messages on-topic and check the CMake FAQ at: 
http://www.cmake.org/Wiki/CMake_FAQ

Kitware offers various services to support the CMake community. For more 
information on each offering, please visit:

CMake Support: http://cmake.org/cmake/help/support.html
CMake Consulting: http://cmake.org/cmake/help/consulting.html
CMake Training Courses: http://cmake.org/cmake/help/training.html

Visit other Kitware open-source projects at 
http://www.kitware.com/opensource/opensource.html

Follow this link to subscribe/unsubscribe:
https://cmake.org/mailman/listinfo/cmake

Reply via email to