Whether this repository needs authentication.

def needs_auth(self):
        """Whether this repository needs authentication."""
        return self.username or self.password or (self.url and self.url.needs_auth)