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

(cherry picked from commit 9ba29b6c550f729b224e00dc4d40eb33855e2862)