Description of problem: JBDS (eclipse) calls cdk vagrant in background without TTY, it needs to pass username/password via env variables. These needs to be added into cdk Vagrant files: config.registration.username = ENV['SUB_USERNAME'] config.registration.password = ENV['SUB_PASSWORD'] I just tested that even with this setting, given that env variables are not set, Vagrant will ask. This is important for non-JBDS use cases. Version-Release number of selected component (if applicable): beta4 cdk.zip How reproducible: Always Steps to Reproduce: 1. Run vagrant up without tty, but with env variables mentioned above 2. Run vagrant up with tty but without variables 3. Actual results: 1. does not work 2. does work (asks) Expected results: 1. works without asking 2. works with asking
On windows, with registration plugin expecting credentials from environment variables, I got question only for password, not for username, it can be problem, need to investigate more.
Added the env variables as requested.
This should be solved a little bit differently. In expected usage it works fine, but problem is if vagrant-registration is not installed. Without registration plugin, config.registration doesn't exists, so vagrant commands fails with traceback. Proposed solution for discussion: 1) encapsulate these command with check for plugin: if Vagrant.has_plugin?('vagrant-registration') config.registration.username = ENV['SUB_USERNAME'] config.registration.password = ENV['SUB_PASSWORD'] end 2) print some nice error if plugin is not installed: # check if plugin is installed on system unless Vagrant.has_plugin?("vagrant-registration") raise "vagrant-registration plugin is not installed, run `vagrant plugin install vagrant-registration` to install the plugin." end