fix clone matching with git
error handling