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

gpg-agent not automatically starting on fresh process #14274

Open
1 task done
traditionalism opened this issue Apr 3, 2022 · 8 comments
Open
1 task done

gpg-agent not automatically starting on fresh process #14274

traditionalism opened this issue Apr 3, 2022 · 8 comments

Comments

@traditionalism
Copy link

traditionalism commented Apr 3, 2022

Search existing issues

  • 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.

image

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.

@traditionalism
Copy link
Author

Problem appears to have fixed itself.

@Kodikuu
Copy link

Kodikuu commented May 6, 2022

I have this exact issue currently.

gpg: can't connect to the gpg-agent: IPC connect call failed
gpg: keydb_search failed: No agent running
gpg: skipped "B9F545678B5D063B": No agent running
gpg: signing failed: No agent running
error: gpg failed to sign the data
fatal: failed to write commit object
2022-05-06T10:39:21.037Z - info: [ui] [AppStore] loading 12 repositories from store
2022-05-06T10:39:21.043Z - info: [ui] [AppStore] found account: Kodikuu (Kodikuu)
2022-05-06T10:39:22.144Z - info: [ui] launching: 3.0.0 (Windows 10.0.19044)
2022-05-06T10:39:22.150Z - info: [ui] execPath: 'C:\Users\%username%\AppData\Local\GitHubDesktop\app-3.0.0\GitHubDesktop.exe'
2022-05-06T10:39:22.215Z - info: [ui] Subscribed 'Kodikuu' to Alive channel
2022-05-06T10:39:22.702Z - info: [ui] Executing installGlobalLFSFilter: git lfs install --skip-repo (took 1.295s)
2022-05-06T10:39:23.912Z - info: [ui] [AppStore.withAuthenticatingUser] account found for repository: ### - Kodikuu (has token)
2022-05-06T10:39:25.100Z - info: [ui] [Timing] Action 'checkout branch from list' for '###' took 1.189s
2022-05-06T10:39:50.560Z - info: [ui] Executing fetch: git -c credential.helper= -c protocol.version=2 fetch --progress --prune origin (took 2.443s)
2022-05-06T10:43:53.421Z - info: [ui] [AppStore.withAuthenticatingUser] account found for repository: ### - Kodikuu (has token)
2022-05-06T10:43:54.793Z - info: [ui] Executing pull: git -c credential.helper= -c protocol.version=2 -c rebase.backend=merge pull --ff --progress origin (took 1.119s)
2022-05-06T10:43:55.133Z - info: [ui] [AppStore.withAuthenticatingUser] account found for repository: ### - Kodikuu (has token)
2022-05-06T10:43:56.359Z - info: [ui] Executing fetch: git -c credential.helper= -c protocol.version=2 fetch --progress --prune origin (took 1.131s)
2022-05-06T10:45:44.399Z - info: [ui] [AppStore.withAuthenticatingUser] account found for repository: ### - Kodikuu (has token)
2022-05-06T10:45:45.846Z - info: [ui] Executing fetch: git -c credential.helper= -c protocol.version=2 fetch --progress --prune origin (took 1.369s)
2022-05-06T10:45:47.994Z - info: [ui] [RepositoryIndicatorUpdater]: Refreshing sidebar indicators for 11 repositories took 9.9s of which 106.3s paused, total 116.2s
2022-05-06T10:45:51.939Z - info: [ui] [Timing] Action 'create branch' for '###' took 0.301s
2022-05-06T10:45:55.271Z - info: [ui] [AppStore.withAuthenticatingUser] account found for repository: ### - Kodikuu (has token)
2022-05-06T10:45:56.070Z - info: [ui] [Timing] Action 'stash and checkout' for '###' took 0.797s
2022-05-06T10:46:48.076Z - info: [ui] Executing createCommit: git commit -F - (took 45.673s)
2022-05-06T10:46:48.083Z - 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 "###": 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-05-06T10:46:48.083Z - info: [ui] [Timing] Action 'create commit' for '###' took 45.842s
2022-05-06T10:47:31.970Z - info: [ui] Executing createCommit: git commit -F - (took 41.204s)
2022-05-06T10:47:31.977Z - 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 "###": 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-05-06T10:47:31.977Z - info: [ui] [Timing] Action 'create commit' for '###' took 41.373s
2022-05-06T10:49:49.696Z - info: [ui] Executing createCommit: git commit -F - (took 6.712s)
2022-05-06T10:49:50.099Z - info: [ui] [Timing] Action 'create commit' for '###' took 7.278s

The above log shows two failures followed by a success. All I did was wait a bit and check for updates, and the third succeeded after that.

Windows 10 21H2
Github Desktop 3.0.0

@Kodikuu
Copy link

Kodikuu commented Jul 5, 2022

I still have this issue on Github Desktop 3.0.3.

@traditionalism
Copy link
Author

traditionalism commented Jul 14, 2022

I'll reopen this, whilst @Kodikuu still has problems with this.

@Kodikuu
Copy link

Kodikuu commented Jul 29, 2022

Still an issue as of 3.0.5, intermittently

@benaclejames
Copy link

Can be worked around by starting gpg-agent on startup

@SlyAceZeta
Copy link

Running into this issue, it's intermittent but when it does happen the second commit will always work.

@steveward
Copy link
Member

Reported in #18484.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

5 participants