def _assert_refspec(self) -> None:
        """Turns out we can't deal with remotes if the refspec is missing."""
        config = self.config_reader
        unset = "placeholder"
        try:
            if config.get_value("fetch", default=unset) is unset:
                msg = "Remote '%s' has no refspec set.\n"
                msg += "You can set it as follows:"
                msg += " 'git config --add \"remote.%s.fetch +refs/heads/*:refs/heads/*\"'."
                raise AssertionError(msg % (self.name, self.name))
        finally:
            config.release()
Turns out we can't deal with remotes if the refspec is missing.
git/remote.py