def git_origin_url(git_repo):  # pylint: disable=redefined-outer-name
    """
    A fixture to fetch the URL of the online hosting for this repository.  Yields
    None if there is no origin defined for it, or if the target directory isn't
    even a git repository.
    """
    if git_repo is None:
        return None
    try:
        origin = git_repo.remotes.origin
    except ValueError:
        # This local repository isn't linked to an online origin
        return None
    return origin.url