I am using
VS Code IDE with
Angular in Windows 11. I have installed latest version of
Git. When I do my code commit from Visual Studio Code. I am getting many errors Like
gpg: skipped "DFDFD": No secret key
Error: cannot spawn C:\Program Files (x86)\GnuPG\bin\gpg.exe: No such file or directory
If one is getting fixed other one started coming. How can I disable GPG for my code commit ? Is that good idea to disable it first of all ?
git config --global commit.gpgsign false command in Bash, getting below error. I opened Bash as admin
> git -c user.useConfigOnly=true commit --quiet --allow-empty-message --file - -S gpg: skipped "DFDFD": No secret key gpg: signing failed: No secret key error: gpg failed to sign the data fatal: failed to write commit object
To do it at the user level, run the following in whatever command-line tool you have.
git config commit.gpgsign false
Run this command to disable the setting globally using thee
git config --global commit.gpgsign false
On Windows, you might need to run this as an administrator.
Likewise—for a native *nix system (macOS, Linux, BSD) you should prefix with
sudo to perform the action as a super user. If you are using
wsl on Windows, then you may first need to run the following in order to act as root:
wsl --user root
VS Code Workspace
P on macOS, or
, on Windows, and open your settings. There are workspace settings and user settings. Uncheck "Enable Commit Signing" if it’s enabled.
If that doesn’t work, it’s got to be something with the local Git repository, or perhaps has to do with some other extension as it’s overriding your global settings with
Finally, you can try the above Repository Level settings from a terminal that’s opened at the path of the Git repository in question. You can do this in VS code by typing
` or going to Terminal > New Terminal and executing the command there.
Answered By – AJAr