This topic provides details on configuring YUM or DNF to work with Artifactory. To get up and running quickly to use RPM, see Get Started with RPM.
Pre-requisite: Before connecting your YUM or DNF client to Artifactory, you must have an existing RPM repository in Artifactory. For more information, see Create an RPM Repository
Supported RPM and DNF Clients
YUM version 4.18.2 or above
DNF version 4.19.2 or above
Logged in vs. Anonymous User: You can work with Artifactory as either a logged in user or as an anonymous user. To work with Artifactory using Anonymous Access. You need to configure that access under Admin | Security | General. For details, refer to Allow Anonymous Access.
Configure your YUM or DNF Client to Work with RPM Packages
You configure your YUM or DNF client by configuring RPM registry credentials in the artifactory.repo file. The artifactory.repo file contains information used by the automatic login feature of the rexec and ftp commands.
To configure your local machine to install RPM packages using YUM or DNF client, follow these steps:
Edit the
artifactory.repofile with root privileges.sudo vi /etc/yum.repos.d/artifactory.repo
Add the following snippet to the
artifactory.repofile.[Artifactory] name=Artifactory baseurl=https://<USERNAME>:<TOKEN>@[JFrogPlatformURL]/artifactory/<RPM-REPO>/<PATH_TO_REPODATA_FOLDER> enabled=1 gpgcheck=0Optional - if you have GPG signing keys installed, use the below flags to verify the repository metadata signature:
[Artifactory] name=Artifactory baseurl=https://<USERNAME>:<TOKEN>@[JFrogPlatformURL]/artifactory/<RPM-REPO>/<PATH_TO_REPODATA_FOLDER>/repomd.xml.key repo_gpgcheck=1Where:
<USERNAME>: Your JPD username<TOKEN>: Token[JFrogPlatformURL]: The URL of your JPD<RPM-REPO>: Name of the repository. If the configured depth is 0, the baseurl should point to the root of the repository<PATH_TO_REPODATA_FOLDER>: Configured repository depth
For example:
[Artifactory] name=Artifactory baseurl=https://john:cmVmdGtuOjAXVXTTVKOUtJeEsyTzdG@company.jfrog.io/artifactory/hc-rpm-local/my-rpm enabled=1 gpgcheck=0Optional - if you have GPG signing keys installed, use the below flags to verify the repository metadata signature:
[Artifactory] name=Artifactory baseurl=https://john:cmVmdGtuOjAXVXTTVKOUtJeEsyTzdG@company.jfrog.io/artifactory/hc-rpm-local/my-rpm/repomd.xml.key repo_gpgcheck=1
Note
You can also use JFrog Set me up to copy the snippet populated with your token and environment. For more information, see Use Artifactory Set Me Up for Configuring Package Manager Clients.
Next Steps: