'Centos 8 : No URLs in mirrorlist

On centos8, when I execute:

dnf update

I get the below error:

Error: Error downloading packages: No URLs in mirrorlist

How to resolve this issue.



Sources

This article follows the attribution requirements of Stack Overflow and is licensed under CC BY-SA 3.0.

Source: Stack Overflow

Solution Source