This method is used when creating {@link Repository} object that refers to a Git repository.