def METHOD_NAME(repo: "Repo") -> Optional[str]:  # type: ignore # noqa: F821
    try:
        return repo.remote().config_reader.get_value("url", None)
    except Exception as e:
        logger.debug(f"Could not get remote from git repo '{repo}'", exc_info=e)
        return None