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

[git] error - gpg failed to sign data #65

Open
nguyenvulong opened this issue Aug 1, 2023 · 0 comments
Open

[git] error - gpg failed to sign data #65

nguyenvulong opened this issue Aug 1, 2023 · 0 comments
Labels
bug Something isn't working documentation Improvements or additions to documentation

Comments

@nguyenvulong
Copy link
Owner

nguyenvulong commented Aug 1, 2023

This is for secure signing, when you are doing something like

git commit -S -m "message"

Solution

first make sure you have register your signing key
git config --global user.signingkey YOUR_KEY
where YOUR_KEY can be retrieved by gpg --list-secret-keys --keyid-format=long

then try to reload the agent
echo RELOADAGENT | gpg-connect-agent

then re-commit. If you still get the error then kill the agent and launch it again
gpgconf --kill gpg-agent
gpgconf --launch gpg-agent

and may be reload it one more time
echo RELOADAGENT | gpg-connect-agent

finally
export GPG_TTY=$(tty)

If it does not work for you, check https://stackoverflow.com/questions/41052538/git-error-gpg-failed-to-sign-data

@nguyenvulong nguyenvulong added bug Something isn't working documentation Improvements or additions to documentation labels Aug 1, 2023
@nguyenvulong nguyenvulong changed the title Git error - gpg failed to sign data [git] error - gpg failed to sign data Aug 8, 2024
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
bug Something isn't working documentation Improvements or additions to documentation
Projects
None yet
Development

No branches or pull requests

1 participant