Issues on building an app with submodules on CodeCommit

I have an app of which source code is hosted on AWS CodeCommit and has some submodules that are also hosted on CodeCommit.

My .gitmodules says:

[submodule "hoge"]
    path = hoge
    url = git-codecommit.ap-northeast-1.amazonaws.com/v1/repos/hoge

This URL works without specifying SSH key ID on url line on my laptop because ~/.ssh/config on my laptop has the following section to specify my user name, plus, I believe that we shouldn’t put any user-specific username on .gitmodules to work with team.

Host git-codecommit.*.amazonaws.com
    User AP******************

With this configuration, however, Bitrise tries to fetch codes from the submodule repository using its login username vagrant instead of using my SSH key ID and it makes the build failed.

Do we have any way to work this out?

Hi @moyoshi!

If you’re cloning across multiple private repositories you need to configure all of them to be accessible via a single shared SSH key. You’ll find the public key Bitrise has set up in your app settings.

More info here:

  • Matthew

Thanks @matthew.jones!
I’m pretty sure that we are using a single SSH key for the all private repos. The problem here is we need to use this username “AP**********” along with the single shared SSH key to access to the private repos. Is there any way to have Bitrise use this specific username for such submodules?

Hey @moyoshi!

Can I get you to do two things for me?

1.) Enable support access.

2.) Send me a build slug for a build with this issue. The build slug is the portion of the URL on the log page after /build/. (Don’t just paste the build URL in here, as Discuss will automatically rewrite it to the login page.)

Matthew
Senior Customer Engineer

Hi @matthew.jones,

I’ve enabled support access and the slug is b174e2260ca36c65.

Thanks for your help!

Thanks @moyoshi!

I suggest taking a look at this Stack Overflow answer.

Basically it looks like the best course of action is to update the ssh url in your .gitmodules to include the required username.

Hope that points you in the right direction!

Matthew
Senior Customer Engineer

Hi @matthew.jones,

It works, thank you!

This topic was automatically closed 30 days after the last reply. New replies are no longer allowed.