permission

Problems encountered when cloning submodules in a GitHub project

GitHub is truly a treasure trove of open source, not only for learning code but also for learning how to use git!

Recently I studied the Off‑the‑Record‑iOS project (https://github.com/chrisballinger/Off-the-Record-iOS) and practiced using git submodules.

This project has a Submodules folder containing other open source projects it depends on. At first I did not notice, and just downloaded the ZIP. In XCode many file names showed up in red, revealing missing dependencies. There were quite a few, so I abandoned manual downloading.

Searching, I found issue #87 where someone asked the same question: https://github.com/chrisballinger/Off-the-Record-iOS/issues/87. Following the answer, I cloned the project with git and ran git submodule init && git submodule update (for git 1.6 and later you can use git clone –recursive). Updating worked for the first few submodules, but then a new error appeared:

Submodule path ‘Submodules/DAKeyboardControl’: checked out ‘5352d1ff2d1131d974d94406ed8fcf8eb068aa72’
Cloning into ‘Submodules/LibOrange’…
Permission denied (publickey).
fatal: Could not read from remote repository.

Please make sure you have the correct access rights
and the repository exists.
Clone of ‘git@github.com:ChatSecure/LibOrange.git’ into submodule path ‘Submodules/LibOrange’ failed

Continue reading…