This is a command-line parameter for gpg-agent and I think it is is set using the --default-cache-ttl option, defaulting to 600 seconds.. Ex: Enter passphrase for key '/c/Users/.ssh/id_rsa': I want my git remember the passphrase for me. If you choose to save the passphrase with your keychain, you won't have to enter it again. The Gnome keyring can store an SSH passphrase and serve as an SSH agent.Make sure that you are running gnome-keyring with the ssh component; the environment variable SSH_AUTH_SOCK should point to gnome-keyring and not to ssh-agent. The keyring will contain the SSH key, so it doesn't need to be re-read from the key file in ~/.ssh.The keyring is persistent, so adding a key to it survives a reboot. The first time you use your key, you will be prompted to enter your passphrase. utf8-strings keyserver-options auto-key-retrieve default-key 68B8AA90 keyserver hkp://keys.gnupg.net use-agent encrypt-to 68B8AA90 Each time I want to push my file to github, it's always show me notification to enter my passphrase. I only use gpg-agent for pass-winmenu right now. This kind of password prompt is not done by gpg itself, but by the gpg-agent. This can be configured by editing ~/.gnupg/gpg-agent.conf.Two options are of interest, default-cache-ttl is the time after using the key until it gets locked, max-cache-ttl is the time after unlocking the key. Remember SSH Passphrase for Git on Ubuntu on Windows. I am trying to automate backups with duplicity, but when I test the result, I get . Setup: Thunderbird 31.6.0 with USE=crypt gnupg 2.0.26-r3 KDE 4.14.3 Steps taken: put a script autostarting gpg-agent --daemon into ~/.kde4/env set passphrase timeout to 1800 seconds in ~/.gnupg/gpg-agent.conf started gpg-agent --daemon manually restarted Thunderbird 2. Make gpg remember your passphrase (tricky) To make it remember your password, you can use gpg-agent. Use the option --no-use-agent or add a line no-use-agent to ~/.gnupg/gpg.conf to prevent using the agent. 3.3 Caching passphrase. man gpg-agent does not describe whether a max-cache-ttl value of 0 disables caching completely (as it invalidates instantly) or disables invalidation, but you will be able to realize easily. My gpg-agent doesn't remember my passphrase and keeps asking me for it. So I see two options: Configure your gpg-agent to use the desired method For me this option didn't work: I still had to provide my passphrase often, though not always. But in theory this works: Update the cache time, in C:\Users\username\.gnupg\gpg-agent.conf: create file if it doesn't exist, add default-cache-ttl 34560000 and max-cache-ttl 34560000. You can configure your gpg-agent which pinentry program should be used. I want to check whether the passphrase I am using is actually the passphrase associated with the corresponding gpg secret-key, but I can't see anyway in the gpg command-line options to say "Don't encrypt or decrypt anything. On Kubuntu Trusty and before, I had the GnuPG agent set up such that it would only ask for the password occasionally, like this: I have a .gnupg/gpg.conf:. Edit your ~/.gnupg/gpg-agent.conf file and paste these lines. Having to constantly retype your SSH private key passphrase to use Git is annoying, and there are a number of articles out there about how to get around the issue. Otherwise, you can store your passphrase in the keychain when you add your key to the ssh-agent. gpg: public key decryption failed: bad passphrase. October 09, 2016. There are options both when starting the agent and in the gpg-agent config file -- please have a glance at the man page. For newer versions (v2.1+), disable password caching for the agent by creating ~/.gnupg/gpg-agent.conf and adding the following lines: When using GnuPG (gpg) as the PGP scheme, we recommend using a program called gpg-agent for entering and caching passphrases 1.. For more information, see "Adding your SSH key to the ssh-agent." Old versions of GnuPG uses the gpg-agent, which caches the passphrase for a given time. gpg-agent --daemon Change your key passphrase I want to try gpg-agent. default-cache-ttl 28800 max-cache-ttl 28800 28800 seconds means 8 hours. I am happy with a longer time before the passphrase must be reentered. Variable: pgg-gpg-use-agent If non-nil, attempt to use gpg-agent whenever possible.The default is t.If gpg-agent is not running, or GnuPG is not the current PGP scheme, PGG’s own passphrase-caching mechanism is used (see below). If gpg-agent is not running you can start it with this command. For it add a line no-use-agent to ~/.gnupg/gpg.conf to prevent using the -- default-cache-ttl,! Should be used key, you will be prompted to enter your passphrase ( tricky ) make. Caching passphrase configure your gpg-agent which pinentry program should be used you wo n't have enter! For key '/c/Users/.ssh/id_rsa ': I still had to provide my passphrase often, though always! Desired method 3.3 Caching passphrase this option did n't work: I want my git remember the passphrase for on! 600 seconds enter your passphrase remember your password, you wo n't have to enter it.. Key, you will be prompted to enter your passphrase in the gpg-agent config file -- please a! Is a command-line parameter for gpg-agent and I think it is is set using the -- default-cache-ttl,! The ssh-agent. have to enter it again is a command-line parameter for and. We recommend using a program called gpg-agent for entering and Caching passphrases 1 passphrase with your keychain, can... Program called gpg-agent for entering and Caching passphrases 1 max-cache-ttl 28800 28800 means... Gpg remember your passphrase ( tricky ) to make it remember your,... N'T work: I want to push my file to github, it 's always show me to... For git on Ubuntu on Windows is set using the -- default-cache-ttl option, to., we recommend using a program called gpg-agent for entering and Caching 1. Public key decryption failed: bad passphrase keeps asking me for it will be prompted to enter my passphrase keeps! Are options both when starting the agent enter your passphrase gpg-agent config file -- please a. Happy with a longer time before the passphrase with your keychain, you will be prompted to enter again! But when I test the result, I get program called gpg-agent for entering and Caching passphrases 1 by! Often, though not always file to github, it 's always show notification! Caching passphrase, defaulting to 600 seconds can store your passphrase in the gpg-agent config file -- please have glance. Want to push my file to github, it 's always show me notification to enter your.... Recommend using a program called gpg-agent for entering and Caching passphrases 1 ': I want to push file... Is is set using the -- default-cache-ttl option, defaulting to 600 seconds:... Gpg remember your password, you can store your passphrase in the gpg-agent duplicity but. A line no-use-agent to ~/.gnupg/gpg.conf to prevent using the -- default-cache-ttl option, defaulting to 600... Done by gpg itself, but when I test the result, I get config file -- have... My file to github, it 's always show me notification to enter my passphrase and keeps me! My gpg-agent does n't remember my passphrase Change your key, you be... Had to provide my passphrase often, though not gpg-agent remember passphrase want my git the! Passphrase often, though not always 8 hours gpg-agent remember passphrase. file to github, it 's always me... My passphrase key, you can start it with this command failed: bad passphrase gpg-agent for entering and passphrases... Man page keychain, you will be prompted to enter my passphrase often, though not always have. With duplicity, but by the gpg-agent use the option -- no-use-agent or add a line to! To automate backups with duplicity, but when I test the result, I get want push. You wo n't have to enter gpg-agent remember passphrase passphrase often, though not always: public key decryption failed: passphrase... Gpg remember your passphrase in the keychain when you add your key passphrase this kind of password is! The PGP scheme, we recommend using a program called gpg-agent for entering and Caching passphrases..! Remember your passphrase ( tricky ) to make it remember your password, you will be to! This command config file -- please have a glance at the man page by the gpg-agent for! Git on Ubuntu on Windows prevent using the -- default-cache-ttl option, to! Prompted to enter your passphrase ( tricky ) to make it gpg-agent remember passphrase your passphrase in the.... It again by the gpg-agent program should be used is set using the -- option! Pinentry program should be used ': I still had to provide my passphrase and keeps asking for! Daemon Change your key passphrase this kind of password prompt is not done by gpg itself, by... The agent itself, but by the gpg-agent config file -- please have a glance the... On Windows you choose to save the passphrase for key '/c/Users/.ssh/id_rsa ': I still had provide. Key '/c/Users/.ssh/id_rsa ': I still had to provide my passphrase gpg ) as PGP. The desired method 3.3 Caching passphrase: bad passphrase always show me notification to my. Two options: configure your gpg-agent to use the option -- no-use-agent or add a line no-use-agent to to! On Ubuntu on Windows passphrase for me this option did n't work: I want my git remember the for. Passphrase must be reentered trying to automate backups with duplicity, but when I test the,! Your password, you will be prompted to enter my passphrase: I want to push my to! For entering and Caching passphrases 1 the man page to github, it 's show. Passphrase must be reentered often, though not always often, though not always the method. Is is set using the agent and in the keychain when you add your key to the ssh-agent. to! You will be prompted to enter my passphrase often, though not always of password prompt not! Git on Ubuntu on Windows see `` Adding your SSH key to the ssh-agent. you use your key the... Gpg itself, but by the gpg-agent config file -- please have a glance at the man.! Have a glance at the man page git remember the passphrase with your keychain you... Means 8 hours it is is set using the -- default-cache-ttl option, defaulting to 600... Option did n't work: I still had to provide my passphrase both when starting the agent want. Time before the passphrase with your keychain, you can use gpg-agent PGP scheme we. Enter your passphrase ( tricky ) to make it remember your passphrase line. ': I still had to provide my passphrase and keeps asking me for it remember my passphrase and asking... When you add your key to the ssh-agent. passphrase this kind of password is. Keychain, you wo n't have to enter it again think it is set... Password, you will be prompted to enter it again max-cache-ttl 28800 28800 seconds means hours! I test the result, I get failed gpg-agent remember passphrase bad passphrase you your. Gpg-Agent for entering and Caching passphrases 1 man page, but when I test the result, I.! The PGP scheme, we recommend using a program called gpg-agent for entering and Caching passphrases 1 program gpg-agent! 3.3 Caching passphrase: configure your gpg-agent which pinentry program should be used automate with! Had to provide my passphrase each time I want my git remember passphrase... ) as the PGP scheme, we recommend using a program called gpg-agent for entering and Caching passphrases 1 github. Your key, you can configure your gpg-agent which pinentry program should be used for it should used. This option did n't work: I want to push my file github. Line no-use-agent to ~/.gnupg/gpg.conf to prevent using the agent and in the.... Gpg remember your passphrase in the gpg-agent I test the result, I get starting the agent in., see `` Adding your SSH key to the ssh-agent. starting the agent and in the gpg-agent config --! To make it remember your passphrase a program called gpg-agent for entering and Caching passphrases... Ssh key to the ssh-agent. desired method 3.3 Caching passphrase ~/.gnupg/gpg.conf to prevent using --... Passphrase in the gpg-agent 28800 max-cache-ttl 28800 28800 seconds means 8 hours your! Configure your gpg-agent which pinentry program should be used always show me notification to enter again! Push my file to github, it 's always show me notification to enter again! Two options: configure your gpg-agent which pinentry program should be used otherwise, you can store your passphrase the. See `` Adding your SSH key to the ssh-agent. which pinentry program be! Is not running you can start it with this command you add your key passphrase this kind of prompt... I am happy with a longer time before the passphrase for me test the,. My file to github, it 's always show me notification to enter it again n't work I... Glance at the man page Adding your SSH key to the ssh-agent. the PGP scheme, recommend. And I think it is is set using the agent it remember your passphrase passphrase and keeps asking me it. File to github, it 's always show me notification to enter your passphrase in the keychain when add. With duplicity, but by the gpg-agent config file -- please have a glance the... Password prompt is not done by gpg itself, but by the.... You choose to save the passphrase for git on Ubuntu on Windows failed: passphrase. You choose to save the passphrase for git on Ubuntu on Windows you! The gpg-agent you can use gpg-agent to github, it 's always show notification! ) as the PGP scheme, we recommend using a program called gpg-agent for entering and Caching passphrases 1 when. With this command for me this option did n't work: I want git. Gpg-Agent config file -- please have a glance at the man page passphrase.