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

(cherry picked from commit 2ec3582d483dc722d4ec12f3ed5fc8ac2744898e)