Sign Up

Sign Up to our social questions and Answers Engine to ask questions, answer people’s questions, and connect with other people.

Have an account? Sign In

Have an account? Sign In Now

Sign In

Login to our social questions & Answers Engine to ask questions answer people’s questions & connect with other people.

Sign Up Here

Forgot Password?

Don't have account, Sign Up Here

Forgot Password

Lost your password? Please enter your email address. You will receive a link and will create a new password via email.

Have an account? Sign In Now

You must login to ask a question.

Forgot Password?

Need An Account, Sign Up Here

Please briefly explain why you feel this question should be reported.

Please briefly explain why you feel this answer should be reported.

Please briefly explain why you feel this user should be reported.

Sign InSign Up

The Archive Base

The Archive Base Logo The Archive Base Logo

The Archive Base Navigation

  • SEARCH
  • Home
  • About Us
  • Blog
  • Contact Us
Search
Ask A Question

Mobile menu

Close
Ask a Question
  • Home
  • Add group
  • Groups page
  • Feed
  • User Profile
  • Communities
  • Questions
    • New Questions
    • Trending Questions
    • Must read Questions
    • Hot Questions
  • Polls
  • Tags
  • Badges
  • Buy Points
  • Users
  • Help
  • Buy Theme
  • SEARCH
Home/ Questions/Q 8028913
In Process

The Archive Base Latest Questions

Editorial Team
  • 0
Editorial Team
Asked: June 5, 20262026-06-05T00:16:27+00:00 2026-06-05T00:16:27+00:00

So I have a project (private repo) that has multiple submodules (also private). I

  • 0

So I have a project (private repo) that has multiple submodules (also private). I have a server hosted on Amazon EC2 that will house the project, and I want to use our private Github repo.

I generated an ssh key for the main project and added it to the projects deploy keys. I also generated additional ssh keys for each submodule and added it to their deploy keys.

When I try and clone the project (using git@github), it doesn’t work:

Permission denied (publickey).
fatal: The remote end hung up unexpectedly

I have double checked each repo and their deploy keys and everything seems correct. Is there some other small step I am missing?

  • 1 1 Answer
  • 0 Views
  • 0 Followers
  • 0
Share
  • Facebook
  • Report

Leave an answer
Cancel reply

You must login to add an answer.

Forgot Password?

Need An Account, Sign Up Here

1 Answer

  • Voted
  • Oldest
  • Recent
  • Random
  1. Editorial Team
    Editorial Team
    2026-06-05T00:16:28+00:00Added an answer on June 5, 2026 at 12:16 am

    Short answer: there is no easy way to use deploy keys with private submodules. In my experience you have two options:

    1. Keep using submodules but stop using deploy keys and instead use a single account-level SSH key that grants access to all your private repositories (easier, less secure)
    2. Stop using submodules, keep using deploy keys, and manually git clone each repository passing in the SSH private key that matches the deploy key (trickier, more secure)

    The reason for this is git clone triggers an SSH connection that can only use a single SSH private key at a time (e.g. ~/.ssh/id_rsa). The SSH private key being used must match the repository’s deploy key — and deploy keys must be unique per project. In the case of a submodule clone, you’re only using a single private key. That key may match your top-level project, but will surely fail on the child projects with the error you provided.

    Hope this is helpful..

    • 0
    • Reply
    • Share
      Share
      • Share on Facebook
      • Share on Twitter
      • Share on LinkedIn
      • Share on WhatsApp
      • Report

Sidebar

Related Questions

I have a project which has the codes in github (a private repo), I
I have a private project, and i want it hosted on google code. this
I have a project that has to export images to PDF. Images and text
I have a private repository on GitHub that contains an ASP.Net MVC project and
I have a project where I receive an encrypted RSA private key for a
I have a little private Google code project. For a SCM I use Mercurial.
I have a project with Spring, JSF and Hibernate. This project has been developed
I have an project with many Books. Each book has many Pages. I would
I have a project to do in Visual Basic. My problem is that the
I have added a new GIT repo (private github repo) to Eclipse EGit repo

Explore

  • Home
  • Add group
  • Groups page
  • Communities
  • Questions
    • New Questions
    • Trending Questions
    • Must read Questions
    • Hot Questions
  • Polls
  • Tags
  • Badges
  • Users
  • Help
  • SEARCH

Footer

© 2021 The Archive Base. All Rights Reserved
With Love by The Archive Base

Insert/edit link

Enter the destination URL

Or link to existing content

    No search term specified. Showing recent items. Search or use up and down arrow keys to select an item.