Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

overrides example #118

Open
spuder opened this issue Feb 19, 2016 · 1 comment
Open

overrides example #118

spuder opened this issue Feb 19, 2016 · 1 comment

Comments

@spuder
Copy link

spuder commented Feb 19, 2016

What's the correct way to use the --overrides option?

For example: The following works inside the .nexus_cli

url: "http://localhost:8081/nexus/"
username: "admin"
password: "admin123"

However none of the following examples work from the command line

nexus-cli get_users --overrides="username"=>"admin","url"=>"http://localhost:8081/nexus/","password"=>"admin123"

nexus-cli get_users --overrides="username"=>"admin","url"=>"http://localhost:8081/nexus/","password"=>"admin123"

nexus-cli get_users --overrides={"username"=>"admin","url"=>"http://localhost:8081/nexus/","password"=>"admin123"}

nexus-cli get_users --overrides={"username":"admin","url":"http://localhost:8081/nexus/","password":"admin123"}

nexus-cli get_users --overrides="username":"admin" --overrides="url":"http://localhost:8081/nexus/" --overrides="password":"admin123"

nexus-cli get_users --overrides="username"=>"admin" --overrides="url"=>"http://localhost:8081/nexus/" --overrides="password"=>"admin123"

The closest commands are:

nexus-cli get_users --overrides="username":"admin" --overrides="url":"http://localhost:8081/nexus/"
The server responded with a 401 status code which is unexpected. Please submit a bug.

and

nexus-cli get_users --overrides="username":"admin","url":"http://localhost:8081/nexus/"
/var/lib/gems/1.9.1/gems/nexus_cli-4.1.0/lib/nexus_cli/connection.rb:20:in join': can't convert nil into String (TypeError) from /var/lib/gems/1.9.1/gems/nexus_cli-4.1.0/lib/nexus_cli/connection.rb:20:innexus_url'
from /var/lib/gems/1.9.1/gems/nexus_cli-4.1.0/lib/nexus_cli/connection.rb:28:in status' from /var/lib/gems/1.9.1/gems/nexus_cli-4.1.0/lib/nexus_cli/remote_factory.rb:26:inrunning_nexus_pro?'
from /var/lib/gems/1.9.1/gems/nexus_cli-4.1.0/lib/nexus_cli/remote_factory.rb:20:in create' from /var/lib/gems/1.9.1/gems/nexus_cli-4.1.0/lib/nexus_cli/tasks.rb:445:innexus_remote'
from /var/lib/gems/1.9.1/gems/nexus_cli-4.1.0/lib/nexus_cli/tasks.rb:160:in get_users' from /var/lib/gems/1.9.1/gems/thor-0.19.1/lib/thor/command.rb:27:inrun'
from /var/lib/gems/1.9.1/gems/thor-0.19.1/lib/thor/invocation.rb:126:in invoke_command' from /var/lib/gems/1.9.1/gems/thor-0.19.1/lib/thor.rb:359:indispatch'
from /var/lib/gems/1.9.1/gems/thor-0.19.1/lib/thor/base.rb:440:in start' from /var/lib/gems/1.9.1/gems/nexus_cli-4.1.0/bin/nexus-cli:6:in<top (required)>'
from /usr/local/bin/nexus-cli:23:in load' from /usr/local/bin/nexus-cli:23:in

'

What is the correct way to pass in an override?

@mwiczynski-cartera
Copy link

Try one pair of double quotes around entire overrides arg.. like this:
nexus-cli get_users --overrides="username:admin,url:http://localhost:8081/nexus/,password:admin123"

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

2 participants