I recommend to do the following instructions in centos:7
container with a mounted volume.
$ rm -f /etc/yum.repos.d/*
## Remove all yum cached data
$ yum clean all
$ mv sample.repo /etc/yum.repos.d/sample.repo
## Generate the metadata cache
$ yum makecache
## Check if the repositories are configured correctly
$ yum repolist
## Clone repos
$ reposync -p /etc/yum.repos.d/
# TODO
Feel free to make a pull request if you find any mistake or better way to make the explanation more clear.
Contact me through email in english or chinese.