git-annex/doc/forum/GPG_passphrase_handling.txt

77 lines
3.1 KiB
Text
Raw Normal View History

2013-11-02 20:07:18 +00:00
[[!meta title="GPG passphrase handling on OSX"]]
2013-10-29 23:31:31 +00:00
Hello!
I'm using OSX 10.9 and have installed gpg (and gpg2, if it matters) through
2013-10-29 23:50:54 +00:00
homebrew and git-annex through cabal. I also installed
https://github.com/joeyh/git-remote-gcrypt like the UI told me.
2013-10-29 23:31:31 +00:00
2013-10-29 23:50:54 +00:00
Whenever I'm trying to add an encrypted remote through the web UI I get a
2013-10-29 23:31:31 +00:00
lot of "You need a passphrase to unlock the secret key for user:" on stdout
2013-10-30 01:13:28 +00:00
and, obviously, I can't enter my passphrase (If I could I wouldn't make this
post to begin with :))
2013-10-29 23:32:05 +00:00
Is this behavior normal? What should I do to work around it?
2013-10-30 01:12:21 +00:00
I did also try to not use the web UI by using this command:
git annex initremote rsync.net type=gcrypt gitrepo=user@host:directory encryption=pubkey keyid=X
2013-10-30 01:10:06 +00:00
Because of this I can't copy files to my remotes. All I get is:
-----
2013-10-30 01:14:53 +00:00
$ git annex copy --to rsync.net
copy MySecretFile (gpg)
2013-10-30 01:10:06 +00:00
You need a passphrase to unlock the secret key for
user: "user"
4096-bit RSA key, ID X, created 2013-10-01 (main key ID Y)
(checking rsync.net...) (to rsync.net...) gpg: no valid addressees
gpg: [stdin]: encryption failed: No user ID
failed
-----
2013-10-29 23:31:31 +00:00
Yes, I am using gpg-agent. When other applications ask for my passphrase I get
2013-10-29 23:42:14 +00:00
the pinentry dialog from GPGTools, just like I've configured it in
~/.gnupg/gpg-agent.conf, but this isn't the case with git-annex.
2013-10-30 01:57:17 +00:00
If I remove GPGTools from /usr/local/bin with: ``brew link --overwrite gnupg &&
brew link --overwrite gnupg2'' it works *slightly* better.
I get that pinentry dialog I want but when I do a copy I get:
-----
$ git annex copy --to rsync.net
copy MySecretFile (gpg) (checking rsync.net...) (to rsync.net...) gpg: no valid addressees
gpg: [stdin]: encryption failed: no such user id
failed
-----
2013-10-30 02:07:58 +00:00
--debug shows me it is executing gpg llke so:
-----
gpg ["--batch","--no-tty","--use-agent","--quiet","--trust-model","always","--batch","--encrypt","--no-encrypt-to","--no-default-recipient","--force-mdc","--no-textmode"]
-----
2013-10-30 16:49:04 +00:00
$ git annex version
git-annex version: 4.20131024
build flags: Assistant Webapp Pairing Testsuite S3 WebDAV FsEvents XMPP DNS Feeds Quvi TDFA CryptoHash
key/value backends: SHA256E SHA1E SHA512E SHA224E SHA384E SKEIN256E SKEIN512E SHA256 SHA1 SHA512 SHA224 SHA384 SKEIN256 SKEIN512 WORM URL
remote types: git gcrypt S3 bup directory rsync web webdav glacier hook
$ gpg --version
gpg (GnuPG) 2.0.22
libgcrypt 1.5.3
Copyright (C) 2013 Free Software Foundation, Inc.
License GPLv3+: GNU GPL version 3 or later <http://gnu.org/licenses/gpl.html>
This is free software: you are free to change and redistribute it.
There is NO WARRANTY, to the extent permitted by law.
Home: ~/.gnupg
Supported algorithms:
Pubkey: RSA, ELG, DSA, ?, ?
Cipher: IDEA, 3DES, CAST5, BLOWFISH, AES, AES192, AES256, TWOFISH,
CAMELLIA128, CAMELLIA192, CAMELLIA256
Hash: MD5, SHA1, RIPEMD160, SHA256, SHA384, SHA512, SHA224
Compression: Uncompressed, ZIP, ZLIB, BZIP2
$ gpg-agent --version
gpg-agent (GnuPG/MacGPG2) 2.0.22
libgcrypt 1.5.3
Copyright (C) 2013 Free Software Foundation, Inc.
License GPLv3+: GNU GPL version 3 or later <http://gnu.org/licenses/gpl.html>
This is free software: you are free to change and redistribute it.
There is NO WARRANTY, to the extent permitted by law.