Need some help getting things working

I'm trying to get automated builds going using teamcity and I'm running into issues. This is the first time I've ever had to do anything like this and I'm running a little stuck.

The project I'm starting with is a windows app and the build agent is remote to the TC server. I already have TC and the build agent talking to each other. My problem is with Git.

The project uses a GitHub Enterprise repository, and I've already resolved the issues with the certificate (we have an enhanced certificate from GoDaddy and I've already added the missing intermediate certs to Java on the server... but that took a long time to figure out).

So now I can checkout the repository, no problem. Except that I have private submodules (which are from the same GH Enterprise repository). So when I go to checkout the submodules I get this error:

Patch is broken, can be found in file: C:\TeamCity\BuildAgent1\temp\globalTmp\temp351856610610790380patch_7

Failed to build patch for build #3 {build id=7}, VCS root: "" {instance id=32, parent internal id=6, parent id=Collage_Windows_HttpsGitMedwebNetMedWebCollageWinGitRefsHeadsMaster, description: ""}, due to error: Patch building failed: jetbrains.buildServer.buildTriggers.vcs.git.submodules.SubmoduleFetchException: Cannot fetch the '' repository used as a submodule at the 'Externals/Project2' path in the 'https://<myuser>' repository in the faffaf445b362b46191f02de49a4373fd1be8b29 commit

The best I can tell is that the authentication on the submodules is failing.

I've tried this as both server and agent checkouts. On the remote, I've configured msysgit at the SYSTEM level to use a password store, thinking that would solve this problem (that log entry came after I set that up and I had already checkout the entire repo, submodules and all, using password authentication)

Normally, I like to use SSH for git and I had originally set things up that way, but the two other developers are not inclined to use SSH and are hardcore Windows guys so I have to adapt myself to their preferences. If I am just developing myself, I can change the git settings to point the logical submodules to the SSH urls and everthing will work fine.

So I need a suggestion on how to proceed. If we were starting with continuous integration (ok, its just nightly builds because we're not unit testing... I know, but I'm just the flunky) this wouldn't be an issue, I could just say, "you're doing it this way", but I can't really do that now.

One suggestion that I have from a colleague (our chief product developer and company owner, actually) is to do the building via a python script. We have a rather extensive build where one repository contains Windows (of various flavors) java, javascirpt, Xamarin, IOS, OSX and other versions of our libraries and the python scripts handle building the right things, and what not. He suggested doing the same here.

So if I set TeamCity to ignore submodules, could I then have my python script execute the git config commands to point the submodules at the ssh URLs and then init/update the submodules before doing the build?

Thanks for whatever help you can provide. I'm at a bit of a loss at this point.
1 comment
Comment actions Permalink

Nevermind. It seems that I wasn't testing the right things at the time. It is better now.


Please sign in to leave a comment.