Logo Questions Linux Laravel Mysql Ubuntu Git Menu
 

How to add certificate for remote repository in JFrog Artifactory

Could you please help me to use JFrog Artifactory certificates feature. (Admin -> Certificates).

I want to add certificate for a maven repository (https://plugins.jenkins.io/repository)

Below are the steps I followed –

  • Step1: Downloaded the certificate (DER encoded binary X.509) for this repository from chrome browser.
  • Step2: Converted certificate extension from .cer to .pem. Directly converted extension from .cer to .pem and tried with open ssl also openssl x509 -inform der -in certificate.cer -out certificate.pem
  • Step3: Add new certificate via (Admin -> Certificates -> New -> Drag and dropped .pem file), Entered Certificate Alias name.

After clicking on Save, I am getting below error –

Certificate could not be added. Unable to read the provided PEM file. Missing private key or certificate.

Other important information –

  • When I researched more on this error, I found jfrog is expecting certificate and private key both in .pem file. When I am downloading certificate from chrome I am getting only certificate but not private key. https://jfrog.com/knowledge-base/how-to-resolve-the-certificate-could-not-be-added-unable-to-read-the-provided-pem-file-missing-key-or-certificate/
  • I have tried the above steps with Base-64 encoded X.509 certificate also but results are same.
like image 664
Gourav Arora Avatar asked Dec 07 '25 06:12

Gourav Arora


1 Answers

What you are doing is adding client certificate. Meaning that when Artifactory will access a remote repository, it will secure the connection using client certificate.

If your problem is that Artifactory does not trust the certificate exposed by the remote repo (https://plugins.jenkins.io/repository) then you need to follow the directions here:

https://www.jfrog.com/confluence/display/RTF/Using+a+Self-Signed+Certificate

More explanations about the differences:

https://www.websecurity.symantec.com/security-topics/client-certificates-vs-server-certificates

Please elaborate a little bit more about the original problem you had, so we could understand if you are picking the right solution.

Good luck.

like image 55
galusben Avatar answered Dec 08 '25 20:12

galusben



Donate For Us

If you love us? You can donate to us via Paypal or buy me a coffee so we can maintain and grow! Thank you!