dradis / dradis-ce

Dradis Framework: Collaboration and reporting for IT Security teams
https://dradis.com/ce/
GNU General Public License v2.0
668 stars 190 forks source link

Vagrant install: change the key server #890

Closed cosad3s closed 2 years ago

cosad3s commented 3 years ago

Steps to reproduce

vagrant up

Expected behavior

Box up

Actual behavior

Cannot run the Vagrant box:

    default: ?: keys.gnupg.net: Host not found
    default: gpgkeys: HTTP fetch error 7: couldn't connect: Success

It is because the key server keys.gnupg.net is gone (Read https://old.reddit.com/r/GnuPG/comments/oyktpm/keysgnupgnet_down_no_longer_resolves/). It can be update with https://keyserver.ubuntu.com/

System configuration

Dradis version: commit 1f15390aa9075b5234de35e3f29acf950f6e31ea Vagrant version: Vagrant 2.2.14

joaociocca commented 3 years ago

thanks for the fix, @cactuschibre! but it seems other fixes are needed to follow the vagrant steps from the original readme.md

vagrant@ubuntu-xenial:~$ cd /dradis/dradis-ce
vagrant@ubuntu-xenial:/dradis/dradis-ce$ rvm install "$(cat .ruby-version)"
Already installed ruby-2.7.2.
To reinstall use:

    rvm reinstall ruby-2.7.2

vagrant@ubuntu-xenial:/dradis/dradis-ce$ ruby bin/setup

== Enabling default add-ons ==
== Installing dependencies ==
Warning: the running version of Bundler (2.1.4) is older than the version that created the lockfile (2.2.8). We suggest you to upgrade to the version that created the lockfile by running `gem install bundler:2.2.8`.
Bundler can't satisfy your Gemfile's dependencies.
Install missing gems with `bundle install`.
Warning: the running version of Bundler (2.1.4) is older than the version that created the lockfile (2.2.8). We suggest you to upgrade to the version that created the lockfile by running `gem install bundler:2.2.8`.
Fetching gem metadata from https://rubygems.org/.........
Fetching gem metadata from https://rubygems.org/.
Resolving dependencies.......
Following files may not be writable, so sudo is needed:
  /usr/share/rvm/gems/ruby-2.7.2
  /usr/share/rvm/gems/ruby-2.7.2/bin
  /usr/share/rvm/gems/ruby-2.7.2/bin
  /usr/share/rvm/gems/ruby-2.7.2/cache
  /usr/share/rvm/gems/ruby-2.7.2/environment
  /usr/share/rvm/gems/ruby-2.7.2/specifications
  /usr/share/rvm/gems/ruby-2.7.2/wrappers
Fetching rake 13.0.6
Installing rake 13.0.6
Gem::FilePermissionError: You don't have write permissions for the /usr/share/rvm/gems/ruby-2.7.2/wrappers directory.
An error occurred while installing rake (13.0.6), and Bundler cannot continue.
Make sure that `gem install rake -v '13.0.6' --source 'https://rubygems.org/'` succeeds before bundling.

In Gemfile:
  bootstrap was resolved to 4.3.1, which depends on
    sassc-rails was resolved to 2.1.2, which depends on
      railties was resolved to 6.1.4.1, which depends on
        rake

== Command ["bundle install"] failed ==
vagrant@ubuntu-xenial:/dradis/dradis-ce$ bundle exec rails server -b 0.0.0.0
bundler: command not found: rails
Install missing gem executables with `bundle install`
vagrant@ubuntu-xenial:/dradis/dradis-ce$

I was reviewing the vagrant up log and found this... could it be the problem?

    default: Installation of RVM in /usr/share/rvm/ is almost complete:
    default:
    default:   * First you need to add all users that will be using rvm to 'rvm' group,
    default:     and logout - login again, anyone using rvm will be operating with `umask u=rwx,g=rwx,o=rx`.
    default:
    default:   * To start using RVM you need to run `source /etc/profile.d/rvm.sh`
    default:     in all your open shell windows, in rare cases you need to reopen all shell windows.
    default:   * Please do NOT forget to add your users to the rvm group.
    default:      The installer no longer auto-adds root or users to the rvm group. Admins must do this.
    default:      Also, please note that group memberships are ONLY evaluated at login time.
    default:      This means that users must log out then back in before group membership takes effect!
    default:
    default: Thanks for installing RVM 🙏
cosad3s commented 3 years ago

Ok, I switched to the standard single-user installation (https://rvm.io/rvm/install#installation) and it works better than the package on the system + users permissions & env. tweaking etc.