Comments (11)
if you see GPGME::Error you can always get more information by setting GPGME_DEBUG:
$ GPGME_DEBUG=9 irb
irb(main):001:0> require 'gpgme'
GPGME 2014-07-17 11:23:15 <0x11b8> gpgme_debug: level=9
...
otherwise we can't isolate which ruby-gpgme or libgpgme is causing the issue.
from ruby-gpgme.
Thanks for the quick response @ueno, I will try to implement this on our server now and see for the error.
from ruby-gpgme.
Hi @ueno, how about debugging during run time on our controllers on a rails application? It's just weird that I tried to install it on a new rails application on an ec2 instance and worked fine, however when I tried to deploy it on our existing application it still gives me an InvalidValue error.
from ruby-gpgme.
In addition to my investigation, it's so weird that in may irb or rails console, it lists all the keys available when running GPGME::Key.find(:public)
, however during run time on my controller, I went inside the gem and added loggers and retrieves no keys.
from ruby-gpgme.
Hi @ueno I've found out that what's causing the issue are the permissions. Sorry for the questions raised. Thanks for your help.
from ruby-gpgme.
@mlagas I am running into the same things here, how did you change the permissions to fix your issue? This is driving me crazy.
from ruby-gpgme.
@colto @mlagas what did you do to fix the permissions???? :) production breaking, grr, help please :)
Adding GPGME_DEBUG=5 or 9 returns me a C segfault
from ruby-gpgme.
Thing is, I had to import the keys manually, for whatever reason they were not ending up in the keyring. And for the "name" use the name from the GPG cert that I saw once I did gpg --import key_path
, then everything worked
Seriously irritated by GPG's stubborn insistence on the keyring and the way it behaves differently from host to host, from key to key
from ruby-gpgme.
Aaaand, I would like to take this moment to reiterate how much I hate GPG as a programming SDK facilitator, it literally never so far behaved the same on 2 different VMs for the purpose of solving the problem of "encrypt file with this key"
this time the issue was that the issues of the PGP key could not be confirmed by the web-of-trust thingy, whatever it is http://askubuntu.com/a/523228/468618
But... still not resolved :-/ this is the debug trace, showing both the successful local execution and the failed execution in production: https://gist.github.com/bbozo/3d8a7fd5f04babb3f08314f9b7d4e491
The production trace is with gpg (GnuPG) 1.4.20
, the exactly same source code depending on gpg (GnuPG) 1.4.18
works on my dev box.
This command works on both boxes:
/usr/bin/gpg1 --output ./test_file.txt.pgp --encrypt --recipient dcapci test_file.txt
Any ideas what might be going wrong? :-/
from ruby-gpgme.
In https://gist.github.com/bbozo/3d8a7fd5f04babb3f08314f9b7d4e491, I see --homedir points to /home/webteh. That means gpg will look for the keys under /home/webteh, rather than /home/webteh/.gnupg. Is it intentional?
GPGME 2016-11-08 11:53:58 <0x7a25> _gpgme_io_spawn: check: path=0x658f330, argv[ 3] = --homedir
GPGME 2016-11-08 11:53:58 <0x7a25> _gpgme_io_spawn: check: path=0x658f330, argv[ 4] = /home/webteh
from ruby-gpgme.
@ueno wowwww, that solved it, set_engine
parameter homedir is homedir of GnuPG, not of the user ^_^ thank you very very much, I am in your debt dear sir
EDIT: you need to set an env var such as GNUPGHOME=/home/user/.gnupg
from ruby-gpgme.
Related Issues (20)
- how to set "personal-compress-preferences": 'ZIP' HOT 2
- Cannot allocate memory Error
- Building v2.0.20 fails on ubuntu 21.10 HOT 4
- How to get ID / email after import? HOT 1
- Nokigiri 1.12.5 compatibility HOT 3
- How do I set compression method as a ZIP by default? HOT 1
- GPGME performance issue, running too slow
- Ruby 3.2 warning: undefining the allocator of T_DATA class GPGME::Ctx
- Tests failing with multiple NoMethodError HOT 2
- The mini_portile2 required version blocks updating if 2.8.0 is installed HOT 1
- Possible to update `mini_portile2` dependency? HOT 1
- v2.0.22 ignores `pkg-config` failures and creates a shared library that cannot load symbols
- GPGME::Error::NoData when using Heroku
- Build failure with Clang 16 (`-Wincompatible-function-pointer-types`) HOT 2
- Exporting private key returns a public key
- the config.guess in libassuan-2.5.5.tar.bz2 is too old,and it cannot guess build type HOT 3
- Build error with Alpine >= 3.18.0 and musl >= 1.2.4 HOT 2
- new release? HOT 2
- Current warnings
- [macOS] Build with bundled libs fails with GCC due to unsupported flags HOT 3
Recommend Projects
-
React
A declarative, efficient, and flexible JavaScript library for building user interfaces.
-
Vue.js
🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.
-
Typescript
TypeScript is a superset of JavaScript that compiles to clean JavaScript output.
-
TensorFlow
An Open Source Machine Learning Framework for Everyone
-
Django
The Web framework for perfectionists with deadlines.
-
Laravel
A PHP framework for web artisans
-
D3
Bring data to life with SVG, Canvas and HTML. 📊📈🎉
-
Recommend Topics
-
javascript
JavaScript (JS) is a lightweight interpreted programming language with first-class functions.
-
web
Some thing interesting about web. New door for the world.
-
server
A server is a program made to process requests and deliver data to clients.
-
Machine learning
Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.
-
Visualization
Some thing interesting about visualization, use data art
-
Game
Some thing interesting about game, make everyone happy.
Recommend Org
-
Facebook
We are working to build community through open source technology. NB: members must have two-factor auth.
-
Microsoft
Open source projects and samples from Microsoft.
-
Google
Google ❤️ Open Source for everyone.
-
Alibaba
Alibaba Open Source for everyone
-
D3
Data-Driven Documents codes.
-
Tencent
China tencent open source team.
from ruby-gpgme.