Authentication failure during zypper update command

Problem

When running zypper update in SUSE Linux, you cannot proceed because user is prompted to enter password.

Authentication required for '(REPO URL)'

User Name: (USERNAME)

Password: 

Environment

  • Compute Engine
  • SUSE Linux Enterprise Server 12 or 15

Solution

  1. Run the following command to check current registration status with SUSE. The command may require sudo permissions.
    SUSEConnect --status-text
  2. The following message will appear if registration with SUSE is broken or expired.
    Error: Invalid system credentials, probably because the registered system was deleted in SUSE Customer Center. Check https://scc.suse.com whether your system appears there. If it does not, please call SUSEConnect --cleanup and re-register this system.
    
  3. Run force re-registration command to fix SUSE registration configuration and confidential:
  4. Run registercloudguest --force-new.
  5. Check registration status again by running SUSEConnect --status-text or zypper update.​​

Cause

This error does not happen often as registercloudguest manages and maintains registration regularly. This error may occur if it fails to do so. In such event, logs by the process registercloudguest in the serial log may provide insight.