Robust support for all git clone urls.

fixes #1485 
@ussuri