How Do You Determine the Repo ID When For The “reposync” Command?

Problem scenario:  Synchronizing yum repositories has a number of benefits.  In a secure environment, CentOS/RedHat/Fedora servers have no access to the Internet.  There are numerous valuable yum repos on the Internet.  Your network administrator may grant you temporary access to such an Internet repository.  You may go to the directory on a server on your network that you want to mirror a copy or house a non-updating copy of the repo locally. 

You want to use the reposync command.  You know that "reposync -r continualintegration" (where "continualintegration" is the repo ID) will synchronize a repository with a source of an Internet repo with the destination being the server you run this command from.  You run "reposync -r continualintegration" and nothing happens.  There is no error, but the directory you were in when you ran the command did not get any files.  You want to ensure that the repo ID itself is valid.  How do you determine the if repo ID itself is valid for the reposync command? 

Solution:  Go to /etc/yum.repos.d/.  In this directory look at content of the *.repo files.  In these files there may a string encapsulated in square brackets like this:  [continualintegration]

Repo IDs are found in *.repo files in /etc/yum.repos.d/ on a CentOS/RedHat/Fedora server.  The repo ID itself will have no square brackets but appear within square brackets [likethis].  In this "continualintegration" example the repository (or repo) ID is "continualintegration" with no quotes.  So to use reposync with "continualintegration," you would enter the command like this:  "reposync -r continualintegration" with no quotes.  Case sensitivity of the repo ID matters when you use the reposync command.  Look at the .repo files carefully for the word or words in brackets "[likeThis]."  For the repo ID you were trying, If there is no string matching in the *.repo files in the /etc/yum.repos.d/ directory, then you do not have a valid repo ID.

Leave a comment

Your email address will not be published. Required fields are marked *