我无法导入密钥文件。我正在使用 ruby 1.9.3 和 ruby-gpgme https://github.com/ueno/ruby-gpgme
require "gpgme"
begin
key = GPGME::Key.import(File.open("private.key"), {:password => "redacted"})
rescue GPGME::Error => g
puts g.inspect
puts g.message
puts g.code
puts g.source
end
输出
设备的 ioctl 不合适
更多信息:/usr/local/opt/rbenv/versions/1.9.3-p392/lib/ruby/gems/1.9.1/gems/gpgme-2.0.2/lib/gpgme/ctx.rb:43:in new': Inappropriate ioctl for device (GPGME::Error)
from /usr/local/opt/rbenv/versions/1.9.3-p392/lib/ruby/gems/1.9.1/gems/gpgme-2.0.2/lib/gpgme/key.rb:120:in
import '来自 gpgme.rb:17:in `'
这是 ctx.rb 文件,但我不明白是什么导致了这个问题...... https://github.com/ueno/ruby-gpgme/blob/master/lib/gpgme/ctx.rb