Try to get credentials using `keyring <https://github.com/jaraco/keyring>`_.

def _get_auth_from_keyring(self):
        """Try to get credentials using `keyring <https://github.com/jaraco/keyring>`_."""
        if not keyring:
            return None

        # Take user from URL if available, else the OS login name
        password = self._get_password_from_keyring(self.user or getpass.getuser())
        if password is not None:
            self.user = self.user or getpass.getuser()
            self.password = password

        return 'keyring'