BZ-1148865 - Cloning a repository via REST API doesn't finish on BPM cluster

(cherry picked from commit 48ef49e5b2cd39f0e432ee2973d7d1aa9af8f06b)