gpg-agent not automatically starting on fresh process
- Dominant language
- TypeScript
- Stars
- 21.8k
- Forks
- 10.5k
- Avg merge
- 1d 15h
- Merged PRs (30d)
- 25
Description
### Search existing issues
- [x] I have searched the issue tracker and confirmed that I was unable to find existing issues for the problem I am experiencing.
### The problem
IF the user requires gpg signing to commit, they may come across this error when using a fresh GitHub Desktop process with no gpg-agent running beforehand.

### Release version
Version 2.9.12 (x64)
### Operating system
Windows 11
### Steps to reproduce the behavior
1. Start a fresh GitHub Desktop process and ensure any gpg-agent/gpg software isn't running in the background by using a task manager.
2. Try to commit changes.
3. Wait for a few seconds.
4. Error.
### Log files
2022-04-03T02:32:38.151Z - info: [ui] [AppStore] loading 3 repositories from store
2022-04-03T02:32:38.185Z - info: [ui] [AppStore] found account: traditionalism (Lucas)
2022-04-03T02:32:38.185Z - info: [ui] [BranchPruner] Last prune took place in 19 hours - skipping
2022-04-03T02:32:39.222Z - info: [ui] launching: 2.9.12 (Windows 10.0.22000)
2022-04-03T02:32:39.234Z - info: [ui] execPath: 'C:\Users\lucas\AppData\Local\GitHubDesktop\app-2.9.12\GitHubDesktop.exe'
2022-04-03T02:32:39.252Z - info: [ui] Subscribed 'traditionalism' to Alive channel
2022-04-03T02:32:41.427Z - info: [ui] Executing getRecentBranches: git log -g --no-abbrev-commit --pretty=oneline HEAD -n 2500 -- (took 1.598s)
2022-04-03T02:32:41.445Z - info: [ui] Executing getRecentBranches: git log -g --no-abbrev-commit --pretty=oneline HEAD -n 2500 -- (took 1.283s)
2022-04-03T02:32:43.847Z - info: [ui] Executing installGlobalLFSFilter: git lfs install --skip-repo (took 5.188s)
2022-04-03T02:34:49.134Z - info: [ui] [RepositoryIndicatorUpdater]: Refreshing sidebar indicators for 2 repositories took 1.0s of which 0.0s paused, total 1.0s
2022-04-03T02:34:54.519Z - info: [ui] Executing getRecentBranches: git log -g --no-abbrev-commit --pretty=oneline HEAD -n 2500 -- (took 2.006s)
2022-04-03T02:34:54.546Z - info: [ui] Executing getBranches: git for-each-ref --format=%00%(refname)%00%(refname:short)%00%(upstream:short)%00%(objectname)%00%(author)%00%(symref)%00 refs/heads refs/remotes (took 2.040s)
2022-04-03T02:34:54.559Z - info: [ui] Executing getWorkingDirectoryDiff: git diff --no-ext-diff --patch-with-raw -z --no-color HEAD -- fxmanifest.lua (took 2.069s)
2022-04-03T02:34:55.809Z - info: [ui] Executing getConfigValueInPath: git config -z pull.rebase (took 1.266s)
2022-04-03T02:34:57.355Z - info: [ui] Executing getAllTags: git show-ref --tags -d (took 1.234s)
2022-04-03T02:35:09.858Z - info: [ui] Executing createCommit: git commit -F - (took 41.829s)
2022-04-03T02:35:09.870Z - error: [ui] `git commit -F -` exited with an unexpected code: 128.
stderr:
gpg: can't connect to the gpg-agent: IPC connect call failed
gpg: keydb_search failed: No agent running
gpg: skipped "E1EEC86C72D8D6124F5B8F9E8C4F5FE22E0D72CB": No agent running
gpg: signing failed: No agent running
error: gpg failed to sign the data
fatal: failed to write commit object
(The error was parsed as 39: null)
2022-04-03T02:35:09.871Z - info: [ui] [Timing] Action 'create commit' for 'traditionalism/geneva-coin-sim' took 42.025s
2022-04-03T02:37:31.334Z - info: [ui] Executing createCommit: git commit -F - (took 8.998s)
2022-04-03T02:37:31.983Z - info: [ui] [Timing] Action 'create commit' for 'traditionalism/geneva-coin-sim' took 9.835s
2022-04-03T02:37:34.647Z - info: [ui] Executing getRemotes: git remote -v (took 1.186s)
2022-04-03T02:37:34.762Z - info: [ui] Executing getCommits: git log origin/patch3..patch3 --date=raw --max-count=100 -z --format=%H%x00%h%x00%s%x00%b%x00%an <%ae> %ad%x00%cn <%ce> %cd%x00%P%x00%(trailers:unfold,only)%x00%D --no-show-signature --no-color -- (took 1.339s)
2022-04-03T02:37:35.079Z - info: [ui] Executing getStashEntries: git log -g -z --pretty=%gD%x1F%H%x1F%gs refs/stash (took 1.536s)
2022-04-03T02:37:35.102Z - info: [ui] Executing getAuthorIdentity: git var GIT_AUTHOR_IDENT (took 1.513s)
2022-04-03T02:41:04.310Z - info: [ui] [AppStore] loading 3 repositories from store
2022-04-03T02:41:04.317Z - info: [ui] [AppStore] found account: traditionalism (Lucas)
2022-04-03T02:41:04.345Z - info: [ui] [BranchPruner] Last prune took place in 19 hours - skipping
2022-04-03T02:41:04.932Z - info: [ui] launching: 2.9.12 (Windows 10.0.22000)
2022-04-03T02:41:04.952Z - info: [ui] execPath: 'C:\Users\lucas\AppData\Local\GitHubDesktop\app-2.9.12\GitHubDesktop.exe'
2022-04-03T02:41:05.352Z - info: [ui] Subscribed 'traditionalism' to Alive channel
2022-04-03T02:41:06.709Z - info: [ui] Executing installGlobalLFSFilter: git lfs install --skip-repo (took 1.783s)
2022-04-03T02:41:59.117Z - info: [ui] Executing createCommit: git commit -F - (took 40.846s)
2022-04-03T02:41:59.119Z - error: [ui] `git commit -F -` exited with an unexpected code: 128.
stderr:
gpg: can't connect to the gpg-agent: IPC connect call failed
gpg: keydb_search failed: No agent running
gpg: skipped "E1EEC86C72D8D6124F5B8F9E8C4F5FE22E0D72CB": No agent running
gpg: signing failed: No agent running
error: gpg failed to sign the data
fatal: failed to write commit object
(The error was parsed as 39: null)
2022-04-03T02:41:59.120Z - info: [ui] [Timing] Action 'create commit' for 'traditionalism/geneva-coin-sim' took 40.957s
2022-04-03T02:44:26.343Z - info: [ui] [RepositoryIndicatorUpdater]: Refreshing sidebar indicators for 2 repositories took 1.1s of which 0.0s paused, total 1.1s
2022-04-03T02:50:24.060Z - info: [ui] Executing fetch: git -c credential.helper= -c protocol.version=2 fetch --progress --prune origin (took 1.208s)
2022-04-03T02:51:20.061Z - info: [ui] Executing createCommit: git commit -F - (took 40.999s)
2022-04-03T02:51:20.070Z - error: [ui] `git commit -F -` exited with an unexpected code: 128.
stderr:
gpg: can't connect to the gpg-agent: IPC connect call failed
gpg: keydb_search failed: No agent running
gpg: skipped "E1EEC86C72D8D6124F5B8F9E8C4F5FE22E0D72CB": No agent running
gpg: signing failed: No agent running
error: gpg failed to sign the data
fatal: failed to write commit object
(The error was parsed as 39: null)
### Screenshots
_No response_
### Additional context
Shortly after the commit without a gpg-agent running and the user receiving this error, the gpg-agent process seems to start. While trying to reproduce this error, the commit 'throbber' in the blue bar seems to spin for a lot longer than it normally would.
Contributor guide
Assessment
This issue has not been assessed yet.