rvm / rvm1-ansible

The official ansible RVM role to install and manage your Ruby versions.
MIT License
271 stars 136 forks source link

Issue with debian 9 #186

Closed zz9pzza closed 5 years ago

zz9pzza commented 5 years ago

I suspect you already know however:


       fatal: [localhost]: FAILED! => {"changed": true, "cmd": ["/tmp/rvm-installer.sh", "stable", "--path", "~/.rvm", "--auto-dotfiles", "--user-install"], "delta": "0:00:01.081853", "end": "2018-12-13 22:37:53.063103", "msg": "non-zero return code", "rc": 2, "start": "2018-12-13 22:37:51.981250", "stderr": "gpg: Signature made Thu 13 Dec 2018 03:09:53 PM UTC\ngpg:                using RSA key 7D2BAF1CF37B13E2069D6956105BD0E739499BDB\ngpg: Can't check signature: No public key", "stderr_lines": ["gpg: Signature made Thu 13 Dec 2018 03:09:53 PM UTC", "gpg:                using RSA key 7D2BAF1CF37B13E2069D6956105BD0E739499BDB", "gpg: Can't check signature: No public key"], "stdout": "Turning on auto dotfiles mode.\nTurning on user install mode.\nDownloading https://github.com/rvm/rvm/archive/1.29.6.tar.gz\nDownloading https://github.com/rvm/rvm/releases/download/1.29.6/1.29.6.tar.gz.asc\nWarning, RVM 1.26.0 introduces signed releases and automated check of signatures when GPG software found. Assuming you trust Michal Papis import the mpapis public key (downloading the signatures).\n\nGPG signature verification failed for '/home/ao3app/.rvm/archives/rvm-1.29.6.tgz' - 'https://github.com/rvm/rvm/releases/download/1.29.6/1.29.6.tar.gz.asc'! Try to install GPG v2 and then fetch the public key:\n\n    sudo gpg --keyserver hkp://keys.gnupg.net --recv-keys 409B6B1796C275462A1703113804BB82D39DC0E3 7D2BAF1CF37B13E2069D6956105BD0E739499BDB\n\nor if it fails:\n\n    command curl -sSL https://rvm.io/mpapis.asc | sudo gpg --import -\n    command curl -sSL https://rvm.io/pkuczynski.asc | sudo gpg --import -\n\nthe key can be compared with:\n\n    https://rvm.io/mpapis.asc or https://keybase.io/mpapis\n    https://rvm.io/pkuczynski.asc\n\nNOTE: GPG version 2.1.17 have a bug which cause failures during fetching keys from remote server. Please downgrade or upgrade to newer version (if available) or use the second method described above.", "stdout_lines": ["Turning on auto dotfiles mode.", "Turning on user install mode.", "Downloading https://github.com/rvm/rvm/archive/1.29.6.tar.gz", "Downloading https://github.com/rvm/rvm/releases/download/1.29.6/1.29.6.tar.gz.asc", "Warning, RVM 1.26.0 introduces signed releases and automated check of signatures when GPG software found. Assuming you trust Michal Papis import the mpapis public key (downloading the signatures).", "", "GPG signature verification failed for '/home/ao3app/.rvm/archives/rvm-1.29.6.tgz' - 'https://github.com/rvm/rvm/releases/download/1.29.6/1.29.6.tar.gz.asc'! Try to install GPG v2 and then fetch the public key:", "", "    sudo gpg --keyserver hkp://keys.gnupg.net --recv-keys 409B6B1796C275462A1703113804BB82D39DC0E3 7D2BAF1CF37B13E2069D6956105BD0E739499BDB", "", "or if it fails:", "", "    command curl -sSL https://rvm.io/mpapis.asc | sudo gpg --import -", "    command curl -sSL https://rvm.io/pkuczynski.asc | sudo gpg --import -", "", "the key can be compared with:", "", "    https://rvm.io/mpapis.asc or https://keybase.io/mpapis", "    https://rvm.io/pkuczynski.asc", "", "NOTE: GPG version 2.1.17 have a bug which cause failures during fetching keys from remote server. Please downgrade or upgrade to newer version (if available) or use the second method described above."]}```

Thanks in advance.
zz9pzza commented 5 years ago

https://travis-ci.org/rvm/rvm1-ansible/jobs/467604338 is a build issue on travis.

zz9pzza commented 5 years ago

183 doesn't fix this.

gpg --version gpg (GnuPG) 1.4.18

cat /etc/debian_version 9.6

geerlingguy commented 5 years ago

Does https://github.com/rvm/rvm1-ansible/pull/188 fix it? I found that through https://github.com/rvm/rvm1-ansible/issues/187

I just applied that patch and still ran into the issue. So after a failed build, I logged into the server and ran:

sudo su
gpg --keyserver hkp://keys.gnupg.net --recv-keys 409B6B1796C275462A1703113804BB82D39DC0E3 7D2BAF1CF37B13E2069D6956105BD0E739499BDB

See recent comments on: https://github.com/rvm/rvm/issues/3110

pkuczynski commented 5 years ago

@lpaulmp when can we release new version?

zz9pzza commented 5 years ago

I am just running tests with head. And I am still getting the issue when I do:

sudo su gpg --keyserver hkp://keys.gnupg.net --recv-keys 409B6B1796C275462A1703113804BB82D39DC0E3 7D2BAF1CF37B13E2069D6956105BD0E739499BDB

I am have imported the keys as the user which installs rvm and see if that helps.

zz9pzza commented 5 years ago

Doing gpg --keyserver hkp://keys.gnupg.net --recv-keys 409B6B1796C275462A1703113804BB82D39DC0E3 7D2BAF1CF37B13E2069D6956105BD0E739499BDB as the user that is rvm is being installed as works. Head currently doesn't work for me on debian 9 installing rvm as a non root user.

pkuczynski commented 5 years ago

Your issue is GPG signature verification failed. That's because you have not imported gpg keys. If you run this command for a user installing rvm, the issue will go away. There is also a fix for rvm ansible role, which I am waiting for @lpaulmp to release...

geerlingguy commented 5 years ago

On new server builds, this is still happening on Debian and Ubuntu though; and manually applying the PR as a patch didn't seem to fix it (with the --batch addition). But still, it would be good to get a new release sometime soon; there are a lot of commits to master since 2.0.1.

lpaulmp commented 5 years ago

@geerlingguy yeah the patch didn't seem to fix the issue with GPG, I didn't release a stable version because GPG is not working properly yet

ghost commented 5 years ago

Following

pkuczynski commented 5 years ago

I just released a new version which should fix the issue u mention...

geerlingguy commented 5 years ago

Testing the latest version of the role now. I was (until today) using an extra task in my playbook to ensure that extra GPG key was added in my pre_tasks:

    - name: Add GPG key for rvm until role installs it correctly.
      command: >
        gpg --keyserver hkp://keys.gnupg.net
        --recv-keys 409B6B1796C275462A1703113804BB82D39DC0E3 7D2BAF1CF37B13E2069D6956105BD0E739499BDB
      changed_when: false
      tags: ['ruby']
geerlingguy commented 5 years ago

...and I can confirm that extra task is no longer required if using rvm.ruby v2.1.1. Thanks!

pkuczynski commented 5 years ago

Awesome! Good to hear :)

lain0 commented 2 years ago

under Ubuntu2004 for me worked this:

    - name: install GPG for rvm
      command: >
        gpg2 --keyserver hkp://keyserver.ubuntu.com
        --recv-keys 409B6B1796C275462A1703113804BB82D39DC0E3 7D2BAF1CF37B13E2069D6956105BD0E739499BDB
      tags: rvm