gopass icon indicating copy to clipboard operation
gopass copied to clipboard

Gopass git setup

Open christian-heusel opened this issue 7 years ago • 6 comments

Summary

Tl;dr git behavior in the initial setup

Steps To Reproduce

gopass uses the 3rd Mail of my GPG-key for commits

Expected behavior

It uses the primary mail or just applys my global git config

Environment

  • OS: Arch Linux
  • OS version: Linux pioneer 4.18.16-arch1-1-ARCH #1 SMP PREEMPT Sat Oct 20 22:06:45 UTC 2018 x86_64 GNU/Linux
  • gopass Version: gopass 1.8.2 (2018-08-03 20:31:47) go1.10.3 linux amd64
  • Installation method: https://aur.archlinux.org/packages/gopass-git/

Additional context

chris@pioneer ~ » gopass recipients
gopass
├── MyStore (/home/chris/.password-store-MyStore)
│   └── 0xA3AA55C37A759E7C - Christian Heusel <[email protected]>
└── 0xA3AA55C37A759E7C - Christian Heusel <[email protected]>

chris@pioneer ~ » gpg --list-keys Christian                                                                                                                                                                 
uid           [ultimate] Christian Heusel <[email protected]>
uid           [ultimate] Christian Heusel <[email protected]>
uid           [ultimate] Christian Heusel <[email protected]>

christian-heusel avatar Nov 04 '18 13:11 christian-heusel

I agree that we should default to the global git config if there is one. Should be easy to detect.

However if there is none, I'm not sure if we can select the "first" sub id. Afaik they are unordered, or aren't they?

dominikschulz avatar Nov 06 '18 08:11 dominikschulz

Well in all the searches they appear sorted by the date of creation, but I think you are right that there is no "real" order ... :smiley:

christian-heusel avatar Nov 06 '18 19:11 christian-heusel

The golang.org/x/crypto/openpgp package provides a map[string]*Identity which is unordered. The on-disk keyring is probably stored in order of creation, but this isn't available through this interface.

dominikschulz avatar Nov 11 '18 19:11 dominikschulz

But wouldnt it make sense to ask the user which one he wants to use if multiple identities are provided? :) Or just default to the global git config as you suggested Thanks for all the input tho :+1:

christian-heusel avatar Nov 12 '18 18:11 christian-heusel

Using the global git config if it exists is definitely something we should do. Also we may ask the user to select an identity. If someone wants to do it, go ahead.

dominikschulz avatar Nov 14 '18 19:11 dominikschulz

I wouldn't mind looking into this.

MikeFE avatar Jan 23 '19 21:01 MikeFE

Hey @dominikschulz, I just want to say thank you! ❤️ I really really appreciate that you took the time to make this work and the countless hours of work you put into gopass in general! 😃

christian-heusel avatar Dec 04 '22 23:12 christian-heusel

Thanks a lot. Our users feedback is very important to me. So any kind of feedback absolutely helps to drive this project forward.

Please give the feature a try once you get a chance to and report back if anything doesn't work as expected.

dominikschulz avatar Dec 05 '22 07:12 dominikschulz