- Create a new GPG key pair
- Add a GPG key to my GitHub account
.gitconfig
A verified (from GitHub) email with my GPG key, where I made sure the email in mine .gitconfig
is the same.- Tell Git about my GPG Key
- Sign the commit with GPG and confirm that it is verified on Github.
- On the same page, I set commits for signing by default with
git config --global commit.gpgsign true
(I use git 2.12). I made a new commit and confirmed that it was signed usinggit verify-commit HEAD
When I try to commit in IntelliJ, I get gpg: cannot open tty 'no tty'
therefore I found that IntelliJ cannot commit the changes when I try to sign a commit (GPG), and added it no-tty
to my C:\Users\username\.gnupg\gpg.conf
file and restarted.
Then I get an error message gpg: Sorry, no terminal at all requested - can't get input
that seems reasonable, because I just added an option that is related to the terminal. As in gpg: Sorry, the terminal is not requested at all - I can’t get the data, because the solution is to delete no-tty
which, I hope, does not apply to my case.
use-agent
gpg.conf
, gpg: gpg-agent is not available in this session
. , , , gpg-agent.
Windows, , - Archlinux wiki (, ). C: /Users/username/.gnupg/gpg-agent.conf
, default-cache-ttl 34560000
max-cache-ttl 34560000
https://superuser.com/questions/624343/keep-gnupg-credentials-cached-for-entire-user-session
gpg-agent, https://superuser.com/questions/1153101/why-does-git-complain-that-no-gpg-agent-is-running , gpg-agent --version
, gpg --version
, gpg2, git config --global gpg.program gpg2
.
gpg2 . Gpg4win ( , ) Gnupg 2 , gpg2 , , GNU Program Files (x86), , , . where gpg
, gpg, , . git git config --global gpg.program 'C:\Program Files (x86)\GnuPG\bin\gpg.exe'
git config --global gpg.program 'C:\Program Files (x86)\GnuPG\bin\gpg.exe'
gpg: skipped "keyid": secret key not available
. gpg: "N": , , , . , gpg, . alias gpg="'C:\Program Files (x86)\GnuPG\bin\gpg.exe'"
, gpg --version
. , .bash_profile
.
gpg --gen-key
. , , , , gpg , , . Windows .
! IntelliJ, . Git Bash no secret key
, , , gpg --list-keys
: gpg.
Intellij IDEA GIT GPG, , MAC , , Windows. :
me.m01.eu GNUPGHOME
C:\Users\username\.gnupg
. , , git commit, : . , gpg C:\Users\username\AppData\Roaming\gnupg
. printenv GNUPGHOME
( ). , .
, , C:\Users\username\.gnupg
, , gpg --list-keys
. gpg, .
gpg --list-keys --homedir='C: /Users/s156757/.gnupg'
, homedir C:\Users\s156757\.gnupg
C:\Users\username\AppData\Roaming\gnupg\gpg.conf
C:\Users\username\AppData\Roaming\gnupg\gpg.conf
. - . , gpg --list-keys
. , no-tty
use-agent
conf .
, : gpg-agent , gpg- git gpg-agent, gpg 2. , Git Bash, IntelliJ.