Process timed out - ServerException - git push

Hi,

2019-11-06 10:39:38,167 WARN [AtlassianEvent::thread-1] T@1HEZUZx638x2136x0 1svwvdj 10.14.2.100 "POST /rest/api/latest/projects/TEST/repos/repo-for-plugin/pull-requests/1/merge HTTP/1.1" c.a.s.i.h.r.DefaultRepositoryHookService [TEST/repo-for-plugin[32]] Error calling TagSyncHook.postUpdate
com.atlassian.bitbucket.ServerException: An error occurred while executing an external process: process timed out

Exception trigger when I try use git push <ex. local remote> <ex. tag>:

public void pushTagToUpstream(Repository forkRep, String tagName){
        GitScmCommandBuilder pushBuilder = gitCommandBuilderFactory.builder(forkRep);
        pushBuilder.command("push").argument("tagSyncPlugin").argument(tagName).errorHandler(errorHandler).build(outputHandler).synchronous().call();
}

How I can fix that?

Maybe a bit late. I recently had to use the GitScmCommandBuilder. Did you try setting a timeout on the command?

Something like:

public void pushTagToUpstream(Repository forkRep, String tagName){
        GitScmCommandBuilder pushBuilder = gitCommandBuilderFactory.builder(forkRep);
        SomeCommandClass?<? > command = pushBuilder.command("push").argument("tagSyncPlugin").argument(tagName).errorHandler(errorHandler).build(outputHandler).synchronous();
        command.setExecutionTimeout(Duration.ofMinutes(5));
        command.setTimeout(Duration.ofMinutes(5));
        command.call();
}