Git External Process Makes Fetch Fail

I'm running on TC 5.1.2. After setting teamcity.git.fetch.separate.process=true in <Data Directory>/config/internal.properties (we had out of memory issues) and rebooting the server, all Git checkouts fail with the following exception:


[2010-06-18 10:50:12,450]   WARN [oader 1 {id=32}] - Triggers.vcs.git.GitVcsSupport - 'git fetch' command failed.
stderr: Exception in thread "main" java.lang.NullPointerException: The factory must not be null


        at org.eclipse.jgit.transport.SshTransport.setSshSessionFactory(SshTransport.java:99)
        at jetbrains.buildServer.buildTriggers.vcs.git.GitVcsSupport.openTransport(GitVcsSupport.java:1286)
        at jetbrains.buildServer.buildTriggers.vcs.git.GitVcsSupport.openTransport(GitVcsSupport.java:1267)
        at jetbrains.buildServer.buildTriggers.vcs.git.Fetcher.fetch(Fetcher.java:64)
        at jetbrains.buildServer.buildTriggers.vcs.git.Fetcher.main(Fetcher.java:42)


[2010-06-18 10:50:12,450]   WARN [oader 1 {id=32}] -      jetbrains.buildServer.VCS - Error while loading vcs version for root 'git@git.development.local:Corona.Security.Control.git#master {id=32}', id=32: 'git fetch' command failed.
stderr: Exception in thread "main" java.lang.NullPointerException: The factory must not be null
        at org.eclipse.jgit.transport.SshTransport.setSshSessionFactory(SshTransport.java:99)
        at jetbrains.buildServer.buildTriggers.vcs.git.GitVcsSupport.openTransport(GitVcsSupport.java:1286)
        at jetbrains.buildServer.buildTriggers.vcs.git.GitVcsSupport.openTransport(GitVcsSupport.java:1267)
        at jetbrains.buildServer.buildTriggers.vcs.git.Fetcher.fetch(Fetcher.java:64)
        at jetbrains.buildServer.buildTriggers.vcs.git.Fetcher.main(Fetcher.java:42)


[2010-06-18 10:50:12,450]   WARN [oader 1 {id=32}] -      jetbrains.buildServer.VCS - Error while loading changes for root git@git.development.local:Corona.Security.Control.git#master {id=32}, cause: 'git fetch' command failed.
stderr: Exception in thread "main" java.lang.NullPointerException: The factory must not be null
        at org.eclipse.jgit.transport.SshTransport.setSshSessionFactory(SshTransport.java:99)
        at jetbrains.buildServer.buildTriggers.vcs.git.GitVcsSupport.openTransport(GitVcsSupport.java:1286)
        at jetbrains.buildServer.buildTriggers.vcs.git.GitVcsSupport.openTransport(GitVcsSupport.java:1267)
        at jetbrains.buildServer.buildTriggers.vcs.git.Fetcher.fetch(Fetcher.java:64)
        at jetbrains.buildServer.buildTriggers.vcs.git.Fetcher.main(Fetcher.java:42)


Any idea what's wrong here?

Thanks,
Alex

2 comments

After some fiddling with the VCS configuration I found that it works as long as you specify the SSH private key explicitly. We used the "Default private key" setting until now, but I had to change it to "Private key" (and in doing so, set the path to the SSH identity file) to make it work with external process = true. The "Test connection" button didn't give any hints about this as it succeeded with both settings.

IMHO it should be documented that external process and default private key do not play well together.

0

Alexander, I created issue for this bug: TW-12515. In first comment you can find a link to git-plugin build with fix.

0

Please sign in to leave a comment.