Reputation: 6841
I am trying to deploy an application from GitHub into a test server. I have created a new user in the server to own the local repository and run the application. Later on this user should also perform a daily pull from the repository automatically.
I am able to run a simple git clone
from the repository with this new user. However, when I try to get all its sub-modules (git clone --recursive
) I get this error:
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 '[email protected]:organisation/submodule.git' into submodule path 'submodule' failed
All the sub-modules are also public repositories at GitHub, that I am able to clone individually to the server with this new user. Why can't they be cloned as sub-modules?
Upvotes: 1
Views: 1254
Reputation: 18833
Your submodule is configured to clone using git:
- update .gitmodules
to reference the https:
URL instead. Change:
[email protected]:organisation/submodule.git
to
https://github.com/organisation/submodule.git
Upvotes: 1