Problem statement
Does every yum failure need switch-centos7-repo.sh?
No. Read the failed URL and repository ID in the original error. A 404 for an obsolete CentOS mirror is different from name-resolution failure, a certificate error, missing credentials or a third-party repository. Preserve the current definitions before deciding on a change.
The bundled LinuxMirrors helper can rewrite definitions and refresh metadata. Its firewall/SELinux prompt is separate from repository recovery; the reviewed guide uses --close-firewall false and explicit backup/upgrade flags. Do not run it just because another installer failed. CentOS 7 remains end-of-life after a successful metadata fetch.
What to check
- Read-only local definitions: grep -nE "^\[|^enabled=|^baseurl=|^mirrorlist=" /etc/yum.repos.d/*.repo
- Compare the failing repository with those definitions; redact tokens and private addresses before sharing. Do not disable TLS/GPG checks as a generic fix.
- A later yum metadata refresh contacts upstream and writes cache; it is a separate authorized verification step, not part of the read-only inspection above.
Parent topic
Separate repository failures, SSH access problems and Docker storage pressure before changing an end-of-life host.