Automated builds with private submodules?

Has anyone actually got this to work?

I’m having no luck, and I have added the deploy keys. Error is:
Warning: Permanently added ‘github.com,192.30.252.130’ (RSA) to the list of known hosts. fatal: could not read Username for ‘https://github.com’:[1] No such device or address Clone of ‘https://…github.com/…’ into submodule path ‘vendor/lib’ failed

Non submodule repos clone fine.

I don’t know anywhere near enough about several of the parts of this - perhaps the best thing to do is to email support@docker.com with the details of your automated build and @rufus can help teach me :smile:

I have the same issue, I created “machine user” on github, and added that user as collaborator to my private repositories on github, and set up SSH deploy key but still no luck making this work…

Hi!

Is there a guide somewhere about this?
Or is it still not possible?

I know the problem is that no private key is available to clone a private submodule in docker build … but how are we supposed to give it to the build process/container?

Hi! I had similar issues with my environment and after talk with docker cloud support, they told me that the best way to clone a private repositories with submodules is create a github machine user with your own private/public key and add a variable into docker cloud repository called: SSH_PRIVATE. This worked for me :slight_smile: