Skip to content

Instantly share code, notes, and snippets.

@chrisa
Created February 6, 2012 14:56
Show Gist options
  • Save chrisa/1752532 to your computer and use it in GitHub Desktop.
Save chrisa/1752532 to your computer and use it in GitHub Desktop.
# Import the key:
IO.popen(['gpg', '--homedir', '/root/.gnupg', '--import'], 'w') do |io|
io.puts key['public_key']
end
# Mark it as ultimately trusted:
IO.popen(['gpg', '--homedir', '/root/.gnupg', '--import-ownertrust'], 'w') do |io|
io.puts "#{key['fingerprint']}:6:"
end
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment