more forgiving repo url handling code