xordataexchange / crypt

Store and retrieve encrypted configs from etcd or consul
http://xordataexchange.github.io/crypt/
MIT License
526 stars 112 forks source link

GnuPG 2.1 support #12

Open maded2 opened 9 years ago

maded2 commented 9 years ago

hi, I am in the process of setting up crypt and I hit this issue with the new GnuPG 2.1 which have removed secring file.

https://www.gnupg.org/faq/whats-new-in-2.1.html#nosecring

and idea how I can get crypt to work?

thanks, eddie

bketelsen commented 9 years ago

hmm. I'll try to take a look over the weekend.

maded2 commented 9 years ago

here's more info:

looks like I can set a key:

/usr/local/bin/crypt set -backend etcd -endpoint http://127.0.0.1:4001 -keyring ~/.pubring.gpg /env/config conf-test.json

curl -L http://127.0.0.1:4001/v2/keys/env/config {"action":"get","node":{"key":"/env/config","value":"wcBMA4V8j+Y+KDDrAQgApguHyhqqRpDA5P9kmGN+w0G/ZtAj15hjHUnniiLYqB67SYPiwbcAxEyYJopyo7lezTerYTdyTi3tLDvbcAt5cdhEIpXyP9bko3zBsFMOjSrG8NRgxUEnl2JUwNCjUPhdJJDngV5FRlij7+US8VspprJNWVxEUsbL0o1sBKKcr2rXa2ZQAT+AswjZOHlXtrdgraBHSlQEKWspPqG8/qT4CFxb08fvNoopxOAmHhmXSnkwBXEZgqEZxYPe0bxgHSgaQmwUvpFUjHt70OLaOzbJQELIMPJqqcNG/wgMNakviRw397aZIQasFcTJMaXalo76YgJwlLqzX2ekiUxpw4DF5NLgAeQRTEcScdyAFLQHbMnZDSkB4Zzg4F7gc+Hd0uDT4nETukjgqOOgwzmLI1rlsOCZ4Qyk4AjmsWikIcBYPCOY7avCoDAzvFmv/39cUwf8raU2RVc+O4eL5Yda7uhJ9KkcPFg+uIkDzXGVAj6T5Gd07jtAqwdAsuDm5lT3H8wP9kcANTRGp8LQYRVo8+SNNrnB3qyY/EOCkBLqoEU97XtNUYYW9b4kx9NdbOOYDhOf9ehzvm+S6g+tCAjgluZkgD/pr0YEujyYFOb89uzhg/mKgWzZoCyA7Dwoa8GwpT+kj7hAhtSsi8jvmvDd11MllOCgVC52NQgi8jpBuOIX4JXm9EY2Znmhjj5Bed3h/F/n3kkFpzX8PhsPOSWfCOL/CK2GO9kqC4iLPCShuMXtmnLubKNg/Topja2g0IXhuFOsdOAt5is+Wqskd+ZqR1ofZxeHHaK9vIGXjlD5KRlbdLlgEN1YjI8lMnSNq4c9JV0Lrzqqg0cfZeQxnt3X5ruX52l4D5bgvuZdW+KJzOvXBQyzwOt4m5xHIs/6mJOQzQAYUGjt0QTPFNmTW2tGwJmLzPkKaA0dUWr8IXu7i0wIRmIyrU7uAWmU4Pjm0cRylRfpoHCm72V4EXaJEA0bu7gytCHFRD72hq3C7WEr55hNdwMMkitKyO3CAIvFbjPBmC40yhu/FRVfx4knZ+AN5uWCsZmQeTGFnQBF2UO/wUoP0exC/OIIZQvi+kkMVvbY9q5mr0zOj47oz/cLLnqGEQlw3gem0yAlh1kcKmbZiRLgVeY9gaQTRQhIh64Gtx3d2TQoYuIdXp7dSvOgqSWHO16HxQRXjXdKo54z9CerwqYNwMAUxDXv2xz4uHU0N6/04ht94NHkXe8VOQBYxgOxruwoCwSAmuDw4C/guuJuEjXe4ELj98Q7BSFIYjHgyOTkKCuMZQP+w336M4PIAY7z4muQQQbhnFkA","modifiedIndex":3,"createdIndex":3}}

I exported the secret key:

gpg -a --export-secret-keys > .secring.gpg

but crypt get fails:

/usr/local/bin/crypt get -backend etcd -endpoint http://127.0.0.1:4001 -secret-keyring ~/.secring.gpg /env/config openpgp: incorrect key

hope this help.

thanks, eddie