My question is about the gpg-agent command that caches gpg keys and passwords.
I want to know how to use it so that I can run several git commands with the -s tag in a script without having to enter my missing gpg phrase every time.
The initial version of my script looks something like this:
git branch -r | grep origin | grep pattern | when reading BRANCH; do TAG = basename $BRANCH ; git tag -s -m "tag $ TAG release" "$ TAG" "$ BRANCH"; done;
I have two use cases:
- I have about 20 release branches that I want to convert to tags.
- I have about 40 release tags that I want to repeat in order to follow the new naming convention.
I am looking for the command line for gpg-agent to run, and then the gpg command that I need to run in order to get my missing phrase that will be used when I do git tag -s
source share