Git submodule woes

I have one project that includes 3 git submodules and TeamCity is running into trouble when it's checking out the source.

The root project is a private github repository and we're authenticating via private key.  The 3 submodules are all public projects hosted on github and thus do not require authentication.  Note that .gitmodules includes the read-only/public URLs for the submodules:

[submodule "Vendor/asi-http-request"]
    path = Vendor/asi-http-request
    url = git://
[submodule "Vendor/OCMock-iPhone"]
    path = Vendor/OCMock-iPhone
    url = git://
[submodule "Vendor/hamcrest-objectivec-iPhone"]
    path = Vendor/hamcrest-objectivec-iPhone
    url = git://

Here's a snippet from the build logs:

Updating sources: server side checkout... (2s)
[Updating sources: server side checkout...] Will perform clean checkout. Reason: Checkout directory is empty or doesn't exist
[Updating sources: server side checkout...] Building clean patch for VCS root: Example/Tamarin
[Updating sources: server side checkout...] Failed to build patch for build 3 {build id=5563}, VCS root: {id=10}, due to error: The patch building failed:
org.eclipse.jgit.errors.CorruptObjectException: Object 6f7b43e82e92b44c84984265d0421618bb284a37 is corrupt: Commit could not be resolved
org.eclipse.jgit.errors.NoRemoteRepositoryException: ERROR: Permission to jonah-carbonfive/hamcrest-objectivec-iPhone denied to example/tamarin.

I'm surprised to see that the submodule URL is transformed from what is in .gitmodules (see underlined above).  It think what's happening is that the public/read-only URL is being converted to its read+write breathen, and that's what's triggering authentication.  I have no idea why that would be happening though.

Using the command-line, "git clone; cd tamarin; git submodule init; git submodule update" works fine.

Any suggestions?  Is this a bug?


Please sign in to leave a comment.