Improved handling of git clone errors.