skip to Main Content

When following the steps to setup mono on the following site it is failing to import the GPG key for the repo.

https://www.mono-project.com/download/stable/#download-lin-centos

This is happening on CentOS machines running both 6.x and 7.x.

rpm –import “https://keyserver.ubuntu.com/pks/lookup?op=get&search=0x3FA7E0328081BFF6A14DA29AA6A19B38D3D831EF

error: https://keyserver.ubuntu.com/pks/lookup?op=get&search=0x3FA7E0328081BFF6A14DA29AA6A19B38D3D831EF: key 1 not an armored public key.

2

Answers


  1. I used this workaround to then download. See https://github.com/mono/mono/issues/16025

    rpm --import https://download.mono-project.com/repo/xamarin.gpg
    
    su -c 'curl https://download.mono-project.com/repo/centos7-stable.repo | tee /etc/yum.repos.d/mono-centos7-stable.repo’
    
    Login or Signup to reply.
  2. This appears to be due to a missing newline at the end of the key file. If you open the key with vi and save it, without making any changes (this is one way to ensure there is a newline at the end of the file), the import works.

    curl -v "https://keyserver.ubuntu.com/pks/lookup?op=get&search=0x3FA7E0328081BFF6A14DA29AA6A19B38D3D831EF" -okey
    vi key
    # don't modify, just save it with ":wq"
    rpm --import key
    

    Another way to add the newline to the end of the file: https://unix.stackexchange.com/a/31955

    sed -i -e '$a' key
    

    see https://github.com/mono/mono/issues/15955

    Login or Signup to reply.
Please signup or login to give your own answer.
Back To Top
Search