but alas like most other 'solutions' to this topic, they reveal that all they had to do in the end was add export GPG_TTY=$(tty) to their. In this post the user talks about gpg-agent authentication not being available when daemonized and gpg access is being initiated by another application (such as an IDE like VSCode), which explains how I could temporarily sign commits after committing a random file or doing echo "test" | gpg -clearsign and being authenticated. bash_profile using both ways and neither solved the issue. Also make sure that this environment variable gets exported, that is you should follow up the setting with an ‘export GPG_TTY’"Īs I understood $(whatever) in bash was to execute a command, but for safe measure I've appended. ‘GPG_TTY=tty’ is plainly wrong what you want is ‘GPG_TTY=tty’ - note the back ticks. Make sure that it has been set to a real tty device and not just to ‘/dev/tty’ i.e. bash_profile on the GitHub docs hereįrom GnuPG: "The far most common reason for this is that the environment variable GPG_TTY has not been set correctly. bash_profile has been correctly configured with export GPG_TTY=$(tty).Īn interesting note on this from the official GnuPG docs shows a syntax discrepency between their way, and the way you are instructed to append this to. So my next focus was the config files themselves, but as has been stated before the credentials match the key in. I added my user to all kinds of groups, including root, and this also had no effect so I think I can safely rule out the following: So being that I can reproduce this problem across vscode official, oss code, and vscodium, as well as bash, I thought maybe this was a permissions related issue, as so many problems with linux typically are. To rule out the gpg-agent theory as described here I followed the instructions on how to reload gpg-agent using the $ gpg-connect-agent reloadagent /bye command demonstrated on the Arch Linux Wiki Okay so day number 2 of trying to fix this. Whats interesting also is that by doing echo "test" | gpg -clearsign I get the same results: it works for a short period of time, then I can't sign anymore. Gpg-agent: gpg-agent running and available There were a few macos users posting about having a stalled gpg-agent running in the background and it fixed it for them, however, I am seeing: website]$ gpg-agent What I have noticed is that after committing without signing, it will work immediately after: I get prompted for my key passphrase the first time, then it works on subsequent commits until a seemingly random number of minutes later, it just doesn't work anymore and the process has to be repeated. Not sure where else to go with this one, as I've tried it across newly initialized local repos as well as repos that I've pulled from github both with official MS vscode (AUR) and OSS version, in the vscode terminal emulator as well as gnome terminal with same results so it has to be either a git thing or a gnugp thing. Same config as last time, user.name and user.email both match each key I've been trying it with. > git commit -quiet -allow-empty-message -file -S > git for-each-ref -format %(refname) %(objectname) -sort -committerdateįailed to watch ref '/home/dw/dev/website/.git/refs/remotes/origin/master', is most likely packed.Įrror: ENOENT: no such file or directory, watch '/home/dw/dev/website/.git/refs/remotes/origin/master'Īt FSWatcher.start (internal/fs/watchers.js:165:26)Īt Object.t.watch (/usr/lib/code/extensions/git/dist/main.js:1:604919)Īt T.updateTransientWatchers (/usr/lib/code/extensions/git/dist/main.js:1:83965)Īt e.fire (/usr/lib/code/out/vs/workbench/services/extensions/node/extensionHostProcess.js:46:87)Īt e.updateModelState (/usr/lib/code/extensions/git/dist/main.js:1:103179) > git rev-parse -symbolic-full-name git rev-list -left-right master.refs/remotes/origin/master I've tried adding export GPG_TTY=$(tty) to. I've tried everything that I've been able to find on this site, and nothing works. UPDATE: Oddly, I'm back to this same issue almost a month later after a fresh arch install. Only thing I can think of is maybe I biffed the directory somehow? Either way, it works now. I restarted vscode (not the first time I've done this in this process) and voilà, it works. I do not get this now, just the error dialog. Typically when I commits in the past I would get a dialog box requesting GPG authentication upon commit. set "git.enableCommitSigning": true in Visual Studio Code settings.furthermore I can't find a way to copy the output log nor can I find where that log is so here is a pic: I'm using Visual Studio Code, proprietary, not opensource version.Įxcludesfile = /home/dweaver/.gitignore_global After a fresh Linux install I'm trying to set up my environment and I keep getting the Git: gpg failed to sign the data error upon committing changes locally.
0 Comments
Leave a Reply. |
AuthorWrite something about yourself. No need to be fancy, just an overview. ArchivesCategories |