Git submodule update fails: ERROR: Repository not found


#1

I’ve added a submodule to my project. Both repos are private.

git submodule init works fine:
Submodule 'ever-react' (git@github.com:everalbum/ever-react.git) registered for path 'ever-react'

However, running git submodule update fails:

Cloning into '/home/ubuntu/android/ever-react'...
Warning: Permanently added the RSA host key for IP address '192.30.253.113' to the list of known hosts.

ERROR: Repository not found.
fatal: Could not read from remote repository.

Please make sure you have the correct access rights
and the repository exists.
fatal: clone of 'git@github.com:everalbum/ever-react.git' into submodule path '/home/ubuntu/android/ever-react' failed
Failed to clone 'ever-react'. Retry scheduled
Cloning into '/home/ubuntu/android/ever-react'...
ERROR: Repository not found.
fatal: Could not read from remote repository.

Please make sure you have the correct access rights
and the repository exists.
fatal: clone of 'git@github.com:everalbum/ever-react.git' into submodule path '/home/ubuntu/android/ever-react' failed
Failed to clone 'ever-react' a second time, aborting

git submodule update returned exit code 1

Action failed: git submodule update

The submodule is in GitHub. It has the Circle CI webhook, service integration, and deploy key (Read-only).


Cloning private submodules
#2

Hello, I recently had the same problem and fixed it!

You need to add a “user key” to your project. See https://circleci.com/docs/1.0/external-resources/. If you work as part of a team, I recommend you create a separate GitHub user that has the required permissions, then login to CircleCI as that user to add the “user key”.

Hope it works for you!


#3

Thanks, that helped. But the URL has changed to: https://circleci.com/docs/1.0/github-security-ssh-keys/#security


#4