sudo used even when :use_sudo is false #71

Closed
creativetags opened this Issue Jun 24, 2013 · 10 comments

Comments

Projects
None yet
2 participants

I've got
set :use_sudo, false

and I even tried adding
set :rvm_install_with_sudo, false

but it still attempts to use sudo to create the gemset. I'm using rvm-capistrano 1.3.1

Owner

mpapis commented Jun 24, 2013

please show your script and all the output capistrano gave (all of it)

$ cap deploy
  * 2013-06-24 18:42:24 executing `deploy'
    triggering before callbacks for `deploy'
  * 2013-06-24 18:42:24 executing `rvm:create_gemset'
  * executing "sudo -p 'sudo password: ' sg rvm -c \"/usr/local/rvm/bin/rvm ruby-1.9.3-p392 do rvm gemset create App\""
    servers: ["app.example.com"]
    [app.example.com] executing command
*** [err :: app.example.com] sudo: no tty present and no askpass program specified
*** [err :: app.example.com] Sorry, try again.
*** [err :: app.example.com] Sorry, try again.
*** [err :: app.example.com] sudo: no tty present and no askpass program specified
*** [err :: app.example.com] Sorry, try again.
*** [err :: app.example.com] Sorry, try again.
*** [err :: app.example.com] sudo: no tty present and no askpass program specified
*** [err :: app.example.com] Sorry, try again.
*** [err :: app.example.com] sudo: 3 incorrect password attempts
*** [err :: app.example.com] sudo: no tty present and no askpass program specified
*** [err :: app.example.com] Sorry, try again.
*** [err :: app.example.com] sudo: 3 incorrect password attempts
    command finished in 1164ms
failed: "bash -c 'sudo -p '\\''sudo password: '\\'' sg rvm -c \"/usr/local/rvm/bin/rvm ruby-1.9.3-p392 do rvm gemset create App\"'" on app.example.com```

mpapis closed this in 2cfd9ca Jun 24, 2013

Owner

mpapis commented Jun 24, 2013

released as 1.3.2

Thanks but it seems that wasn't the issue stopping me. I'm getting :use_sudo is set to 'false' but sudo is needed to install rvm_type: system. The thing is it was working with rvm system and not using sudo when I set it up a couple of months ago.

Owner

mpapis commented Jun 25, 2013

if your user is already in rvm group then yes the sudo sg ... is redundant, this can be wrapped in extra detection code.

mpapis reopened this Jun 25, 2013

Thanks, can you show me an example of how to do that?

mpapis closed this in 831d41f Jun 26, 2013

Owner

mpapis commented Jun 26, 2013

released as 1.3.3.rc1

mpapis reopened this Jun 26, 2013

mpapis closed this Jun 26, 2013

Owner

mpapis commented Jun 26, 2013

please test the new version and let me know how it works for you

mpapis reopened this Jun 26, 2013

That works, thanks!

Owner

mpapis commented Jun 26, 2013

released 1.3.3

mpapis closed this Jun 26, 2013

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment