BZ1022986 - Cannot clone repository when a url contains leading and trailing whitespaces
(cherry picked from commit f01921fd8d443b7b6ef820776fdeff54556abcd7)