More robust handling of gitURLs (but not final solution)