Skip to content

Commit 5f9e0bf

Browse files
codez0mb1eCopilot
andauthored
Potential fix for pull request finding
Co-authored-by: Copilot Autofix powered by AI <175728472+Copilot@users.noreply.github.com>
1 parent 55c7ac9 commit 5f9e0bf

1 file changed

Lines changed: 4 additions & 2 deletions

File tree

development/git_configure.sh

Lines changed: 4 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -56,8 +56,10 @@ git config --global commit.gpgsign true
5656
[ -f ~/.bashrc ] && echo 'export GPG_TTY=$(tty)' >> ~/.bashrc
5757

5858
# cache GPG passphrase for 1 hour
59-
echo "default-cache-ttl 3600" >> ~/.gnupg/gpg-agent.conf
60-
echo "max-cache-ttl 86400" >> ~/.gnupg/gpg-agent.conf
59+
mkdir -p ~/.gnupg
60+
touch ~/.gnupg/gpg-agent.conf
61+
grep -qxF "default-cache-ttl 3600" ~/.gnupg/gpg-agent.conf || echo "default-cache-ttl 3600" >> ~/.gnupg/gpg-agent.conf
62+
grep -qxF "max-cache-ttl 86400" ~/.gnupg/gpg-agent.conf || echo "max-cache-ttl 86400" >> ~/.gnupg/gpg-agent.conf
6163
gpgconf --reload gpg-agent
6264

6365
# (optional) if you have issues with gpg

0 commit comments

Comments
 (0)