COBHC
COBHC

Reputation: 67

Create a yum repository from Artifactory (containing rpm packages)

I want to create a yum repository from my Artifactory URL where I have various rpm packages available.

I created .repo file as below in /etc/yum.repos.d

[customrepo]
name=CustomRepository
baseurl=https://jfrogurl/postgres/13.01.0000
enabled=1
gpgcheck=0

After this when I type yum list I get the following error:

Error: Failed to download metadata for repo 'customrepo': repomd.xml parser error: Parse error at line: 32 (Opening and ending tag mismatch: meta line 0 and head)

Am I missing anything?

Upvotes: 0

Views: 4578

Answers (1)

Dror Bereznitsky
Dror Bereznitsky

Reputation: 20376

You need to make sure that the baseurl in yum.repos.d points to the path which contains the Yum repository metadata files.
From your question it looks like you are pointing to postgres/13.01.0000. You need to make sure that this path contains the metadata files.
By default the metadata is stored relative to the repository's root folder. In this case, Artifactory searches the entire repository for RPMs and saves the repodata directory at $REPO-KEY/repodata. You can control this behavior by configuring the RPM Metadata Folder Depth parameter.

Upvotes: 3

Related Questions