@Override public void fetch(FetchRequest request) throws GitException, UnauthorizedException { String remoteUri = getRemoteUri(request.getRemote()); FetchCommand fetchCommand = nativeGit.createFetchCommand(); fetchCommand .setRemote(request.getRemote()) .setPrune(request.isRemoveDeletedRefs()) .setRefSpec(request.getRefSpec()) .setRemoteUri(remoteUri) .setTimeout(request.getTimeout()); executeRemoteCommand(fetchCommand); }