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

"rultor encrypt" command fails #16

Closed
aistomin opened this issue Mar 18, 2016 · 9 comments
Closed

"rultor encrypt" command fails #16

aistomin opened this issue Mar 18, 2016 · 9 comments

Comments

@aistomin
Copy link

I'm sorry, maybe title of the issue is too general, but for me it's difficult to say what's really going on. That is what I get in terminal:

chriss-MBP:.gnupg andrej$ rultor encrypt -p aistomin/jenkins-sdk pubring.gpg
+ set -e
+ file=./pubring.gpg
+ asc=./pubring.gpg.asc
+ '[' -e ./pubring.gpg.asc ']'
++ mktemp
usage: mktemp [-d] [-q] [-t prefix] [-u] template ...
       mktemp [-d] [-q] [-u] -t prefix 
+ tmp=
/Library/Ruby/Gems/2.0.0/gems/rultor-0.4.2/lib/rultor/encrypt.rb:55:in `run': PGP encryption failed (RuntimeError)
    from /Library/Ruby/Gems/2.0.0/gems/rultor-0.4.2/bin/rultor:48:in `block (3 levels) in <top (required)>'
    from /Library/Ruby/Gems/2.0.0/gems/slop-3.6.0/lib/slop.rb:260:in `call'
    from /Library/Ruby/Gems/2.0.0/gems/slop-3.6.0/lib/slop.rb:260:in `parse!'
    from /Library/Ruby/Gems/2.0.0/gems/slop-3.6.0/lib/slop.rb:235:in `parse!'
    from /Library/Ruby/Gems/2.0.0/gems/slop-3.6.0/lib/slop.rb:65:in `parse!'
    from /Library/Ruby/Gems/2.0.0/gems/slop-3.6.0/lib/slop.rb:54:in `parse'
    from /Library/Ruby/Gems/2.0.0/gems/rultor-0.4.2/bin/rultor:39:in `<top (required)>'
    from /usr/bin/rultor:23:in `load'
    from /usr/bin/rultor:23:in `<main>'

My environment is:
MacOS 10.10.5
gpg (GnuPG) 1.4.20
rultor-0.4.2

Let me know if I can provide any additional information. Thanks in advance for your help.

@alex-palevsky
Copy link
Collaborator

@yegor256 please dispatch this issue

@aistomin
Copy link
Author

@alex-palevsky @yegor256 As I understand the problem here is in this line in encrypt.rb(line 73):

tmp=$(mktemp)

MacOS has different syntax for mktemp function, it requires the name of file. I played a little bit locally and found that, for example, this code works like a charm:

tmp=$(mktemp 'test')

Of course, in permanent solution you have to implement something random instead of 'test'. Some information you can get here: http://stackoverflow.com/questions/31396985/why-is-mktemp-on-os-x-broken-with-a-command-that-worked-on-linux
I hope it will help a little bit.

@yegor256
Copy link
Owner

@aistomin definitely a bug, let me try to fix it

@yegor256
Copy link
Owner

@aistomin BTW, on my OSX 10.11.3 this one works without problems:

$ mktemp
/var/folders/vl/633jwjvn2jvbj9zfg1sgglhw0000gp/T/tmp.ea4VvHiSSB

yegor256 pushed a commit that referenced this issue Mar 28, 2016
@yegor256
Copy link
Owner

@rultor release, tag is 0.4.3

@rultor
Copy link
Collaborator

rultor commented Mar 28, 2016

@rultor release, tag is 0.4.3

@yegor256 OK, I will release it now. Please check the progress here

@rultor
Copy link
Collaborator

rultor commented Mar 28, 2016

@rultor release, tag is 0.4.3

@yegor256 Done! FYI, the full log is here (took me 5min)

@aistomin
Copy link
Author

@yegor256

BTW, on my OSX 10.11.3 this one works without problems:

You're right, I'm lazy to update my OS :) I'm using the antique one :)

Just now I updated rultor gem and encryption works like a charm. Thanks a lot for fix. I'm going to close the issue.

@yegor256
Copy link
Owner

@aistomin no problem, version 0.4.3 should work everywhere

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

4 participants