Project

General

Profile

Actions

Bug #26463

closed

Satellite gpg key import removes newline

Added by Tomer Brisker almost 6 years ago. Updated almost 6 years ago.

Status:
Closed
Priority:
Normal
Assignee:
Category:
Content Credentials
Target version:
Difficulty:
Triaged:
Yes
Fixed in Releases:
Found in Releases:

Description

Cloned from https://bugzilla.redhat.com/show_bug.cgi?id=1616209

Description of problem:

Satellite gpg key import removes newline.

Version-Release number of selected component (if applicable):

How reproducible:

Steps to Reproduce:
1. Get the GPG key for any custom repository. example : wget https://packages.vmware.com/tools/keys/VMWARE-PACKAGING-GPG-RSA-KEY.pub

2. Create a new GPG key in satellite either with hammer or from GUI.

hammer gpg create \
--key ~/VMWARE-PACKAGING-GPG-RSA-KEY.pub \
--name "my_key" \
--organization "Example_Org"

3. Add the GPG key to custom repository.

Content > Products > Custom_product > Custom_repository > Edit GPG key to add "my_key"

4. On the client download the GPG key.

[root@client ~]# wget https://satellite.example.com/katello/api/repositories/repo_id/gpg_key_content

5. Now import the key.

[root@client ~]# rpm --import gpg_key_content

error: gpg_key_content: key 1 not an armored public key.

6. When we take the difference of the actual key and gpg_key_content we get below output.

diff VMWARE-PACKAGING-GPG-RSA-KEY.pub gpg_key_content
< -----END PGP PUBLIC KEY BLOCK-----
---
> -----END PGP PUBLIC KEY BLOCK-----
\ No newline at end of file

Actual results:

[root@client ~]# rpm --import gpg_key_content

error: gpg_key_content: key 1 not an armored public key.

Expected results:

The key should imported as expected.

Additional info:

1. This behaviour is happening on satellite as well.

2. Same steps tried with other key and got the same result.

3. Even if we go to satellite GUI and add a new line to the GPG key it produces the same error while importing.

Actions #1

Updated by The Foreman Bot almost 6 years ago

  • Status changed from New to Ready For Testing
  • Assignee set to Tomer Brisker
  • Pull request https://github.com/Katello/katello/pull/8044 added
Actions #2

Updated by Andrew Kofink almost 6 years ago

  • Target version set to Katello 3.12.0
  • Triaged changed from No to Yes
Actions #3

Updated by Anonymous almost 6 years ago

  • Status changed from Ready For Testing to Closed
Actions

Also available in: Atom PDF