Remote SSH - Git: gpg failed to sign the data
See original GitHub issueDoes this issue occur when all extensions are disabled?: Yes/No
-
VS Code Version: 1.59.0
-
OS Version:
Version: 1.59.0 (user setup) Commit: 379476f0e13988d90fab105c5c19e7abc8b1dea8 Date: 2021-08-04T23:13:12.822Z Electron: 13.1.7 Chrome: 91.0.4472.124 Node.js: 14.16.0 V8: 9.1.269.36-electron.0 OS: Windows_NT x64 10.0.19043
Steps to Reproduce:
I’m using Remote - SSH from Windows 10 to Ubuntu 20.04 LTS.
-
Add the following code to
~/.profile
export GPG_TTY=$(tty)
-
Configure git
git config --global commit.gpgsign true git config --global --unset gpg.program git config --global --add gpg.program /usr/bin/gpg
-
Enable Commit Signing
-
Commit
-
Open Git Log
> git -c user.useConfigOnly=true commit --quiet --allow-empty-message --file - -S error: gpg failed to sign the data fatal: failed to write commit object > git config --get-all user.name > git config --get-all user.email
-
Show Command Output
> git -c user.useConfigOnly=true commit --quiet --allow-empty-message --file - -S error: gpg failed to sign the data fatal: failed to write commit object
Issue Analytics
- State:
- Created 2 years ago
- Reactions:16
- Comments:29
Top Results From Across the Web
'Git: gpg failed to sign the data' in visual studio code
What I have noticed is that after committing without signing, it will work immediately after: I get prompted for my key passphrase the...
Read more >GPG signing commits over ssh - Waylon Walker
This is the error message I was seeing. gpg failed to sign the data ssh. The fix. The fix ended up ...
Read more >gpg failed to sign the data · Yubikey Handbook - Rui Marinho
This means you have blocked the normal PIN due to many incorrect attempts. The third PIN represents the retry counter for the Admin...
Read more >Sign commits with GPG keys | IntelliJ IDEA Documentation
Download and install the Gpg4Win package and make sure that git config gpg.program points to the gpg.exe file from the package by doing...
Read more >GPG | Tower Help
Enable signing either in the GPG section of the repository settings or the global git config in the application preferences and make sure...
Read more >Top Related Medium Post
No results found
Top Related StackOverflow Question
No results found
Troubleshoot Live Code
Lightrun enables developers to add logs, metrics and snapshots to live code - no restarts or redeploys required.
Start FreeTop Related Reddit Thread
No results found
Top Related Hackernoon Post
No results found
Top Related Tweet
No results found
Top Related Dev.to Post
No results found
Top Related Hashnode Post
No results found
Top GitHub Comments
Same issue here. I am on Windows10 using SSH and developing on Fedora. The following gets it to work, but the steps must be repeated every time you re-open VSCode.
export GPG_TTY=$(tty)
echo "test" | gpg2 --clearsign
enter passwordIf you don’t do step 1 and go straight to step 2, you get this error;
I can confirm the problem. I am using remote SSH from a Windows machine developing on a Linux machine. I have
export GPG_TTY=$(tty)
in my.profile
. But I have to manually export it in the console and sign something once in the console (e.g.echo "test" | gpg2 --clearsign
) to be able to use VSCode to use signed git commits.