Bug 730380 - Can not import a certificate via the cli
Can not import a certificate via the cli
Product: Red Hat Enterprise Linux 6
Classification: Red Hat
Component: subscription-manager (Show other bugs)
Unspecified Unspecified
medium Severity medium
: rc
: ---
Assigned To: Bryan Kearney
John Sefler
Depends On:
Blocks: rhsm-rhel62 732509
  Show dependency treegraph
Reported: 2011-08-12 13:20 EDT by Bryan Kearney
Modified: 2011-12-06 12:23 EST (History)
7 users (show)

See Also:
Fixed In Version:
Doc Type: Bug Fix
Doc Text:
Story Points: ---
Clone Of:
: 732509 (view as bug list)
Last Closed: 2011-12-06 12:23:28 EST
Type: ---
Regression: ---
Mount Type: ---
Documentation: ---
Verified Versions:
Category: ---
oVirt Team: ---
RHEL 7.3 requirements from Atomic Host:
Cloudforms Team: ---

Attachments (Terms of Use)

  None (edit)
Description Bryan Kearney 2011-08-12 13:20:41 EDT
GUI has this functionality, the cli does not.
Comment 4 John Sefler 2011-08-12 15:15:26 EDT
It was decided a long time ago that a CLI "root" user could accomplish import using: cp <import_file> /etc/pki/entitlement

However, the design has changed so that an entitlement cert from rhsm-web can now have a key appended (see bug 712980).  As such a CLI import function makes sense to handle splitting the contents of the import file..
Comment 5 Bryan Kearney 2011-08-15 14:05:19 EDT
fixed in master at eeb90f106bc8fe32baf797ae33bdfc48608738f2.
Comment 8 spandey 2011-09-07 04:51:55 EDT
verified using following steps 

[root@dhcp201-207 ~]# rpm -qa | grep subscription
[root@dhcp201-207 ~]# subscription-manager list --avail
Error: You need to register this system by running `register` command before using this option.
[root@dhcp201-207 ~]# subscription-manager import --certificate /tmp/4177067579706068544.pem 
Successfully imported certificate 4177067579706068544.pem
[root@dhcp201-207 ~]# ls /etc/pki/entitlement/
4177067579706068544-key.pem  4177067579706068544.pem
[root@dhcp201-207 ~]# 

successfully imported entitlement cert via cli 

Working fine moving defect status from ON_QA to verified
Comment 9 errata-xmlrpc 2011-12-06 12:23:28 EST
Since the problem described in this bug report should be
resolved in a recent advisory, it has been closed with a
resolution of ERRATA.

For information on the advisory, and where to find the updated
files, follow the link below.

If the solution does not work for you, open a new bug report.


Note You need to log in before you can comment on or make changes to this bug.