Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Error: Duplicated entry in the keychain when gpg has comment #30

Open
brandonryan opened this issue Aug 30, 2022 · 0 comments
Open

Error: Duplicated entry in the keychain when gpg has comment #30

brandonryan opened this issue Aug 30, 2022 · 0 comments
Labels
bug Something isn't working

Comments

@brandonryan
Copy link

brandonryan commented Aug 30, 2022

Describe the bug

I've been trying to use this gpg-agent for a while now. Finally got it working on the M1 chip mac.
However, now im running into a new issue related to gpg comments and regex.

Seems like pinentry-mac stores the key in the keychain without the comment, so when pinentry-touchid is looking for it, it isnt found -> tries to create -> duplicate key error.

System information

macOS

  • Architecture: M1
  • Version: (e.g. 11.6.1)

GPG
gpg (GnuPG) 2.3.7
libgcrypt 1.10.1
Homebrew: yes

Configuration
gpg:OpenPGP:/opt/homebrew/Cellar/gnupg/2.3.7_1/bin/gpg
gpgsm:S/MIME:/opt/homebrew/Cellar/gnupg/2.3.7_1/bin/gpgsm
keyboxd:Public Keys:/opt/homebrew/Cellar/gnupg/2.3.7_1/libexec/keyboxd
gpg-agent:Private Keys:/opt/homebrew/Cellar/gnupg/2.3.7_1/bin/gpg-agent
scdaemon:Smartcards:/opt/homebrew/Cellar/gnupg/2.3.7_1/libexec/scdaemon
dirmngr:Network:/opt/homebrew/Cellar/gnupg/2.3.7_1/bin/dirmngr
pinentry:Passphrase Entry:/opt/homebrew/opt/pinentry/bin/pinentry

Logs
(I added some logs)

2022/08/30 09:18:23 main.go:119: Ready!
2022/08/30 09:18:23 main.go:260: description: pinentry.Settings{Desc:"Please enter the passphrase to unlock the OpenPGP secret key:\n"Brandon Ryan (brandonryan.dev) bjryan19@protonmail.com"\n4096-bit RSA key, ID C39ECBC9739CCB93,\ncreated 2021-11-24.\n", Prompt:"Passphrase:", Error:"", OkBtn:"", NotOkBtn:"", CancelBtn:"", Title:"", Timeout:0, RepeatPrompt:"", RepeatError:"", QualityBar:"", PasswordQuality:(func(string) int)(nil), KeyInfo:"n/D25BB7218F89E807AAF8A055340843E8FDAC1A0B", Opts:pinentry.Options{Grab:false, AllowExtPasswdCache:true, Display:"", TTYType:"xterm-256color", TTYName:"/dev/ttys000", TTYAlert:"", LCCtype:"en_US.UTF-8", LCMessages:"en_US.UTF-8", Owner:"23826/501 Brandons-MacBook-Pro.local", TouchFile:"/Users/brandonryan/.gnupg/S.gpg-agent", ParentWID:"", InvisibleChar:""}}
2022/08/30 09:18:23 main.go:285: matches: []string{"ID C39ECBC9739CCB93,", "C39ECBC9739CCB93"}
2022/08/30 09:18:23 main.go:291: KeyID: "C39ECBC9739CCB93"
2022/08/30 09:18:23 main.go:298: keychain label: "Brandon Ryan (brandonryan.dev) bjryan19@protonmail.com (C39ECBC9739CCB93)"
2022/08/30 09:18:23 main.go:305: key exists: false
2022/08/30 09:18:23 main.go:348: Duplicated entry in the keychain

gpg-agent:

#pinentry-program /opt/homebrew/bin/pinentry-mac
#pinentry-program /opt/homebrew/opt/pinentry-touchid/bin/pinentry-touchid

pinentry-program /Users/brandonryan/Development/pinentry-touchid/pinentry-touchid

@brandonryan brandonryan added the bug Something isn't working label Aug 30, 2022
@brandonryan brandonryan changed the title Error: Duplicated entry in the keychain" Error: Duplicated entry in the keychain when gpg has comment Aug 30, 2022
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
bug Something isn't working
Projects
None yet
Development

No branches or pull requests

1 participant