-
Notifications
You must be signed in to change notification settings - Fork 113
Lack of useful error messages when key cannot be added #61
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
Comments
It's silly, but ubuntu comes with two gpg versions, 1 and 2. Gpg agent comes from version two, but keychain is using version one, so this is it does not work. I have no idea how can I convince keychain to use version two. |
Same problem here (Ubuntu 16.04). Any solutions around? |
I don't know if this will help: There is a call to gpg in the last while loop of keychain. I have found that when I make essentially the same call manually from the command line, it works. It is an ugly fix and I don't know why it works. I have a makefile which contains the following targets. The first usually fails, but does the ssh part successfully, and the second part succeeds to fix the missing gpg functionality.
I also have this in my .bashrc
|
More of my random notes on this problem (maybe some of this will be helpful):
|
I'm having the same problem in Ubuntu 16.04. When I kill the existing process and start again it works, but every time I restart the machine I have to do that. Any solution? |
I can confirm that changing the two instances of |
This issue has been imported into the Funtoo Linux bug tracker. This helps us to ensure that your bug is prioritized and gets the attention it deserves. You are welcome to create a Funtoo account and participate in the Funtoo Linux workflow or follow-up in the GitHub issue (comments are not currently synchronized.) Follow the action here: https://bugs.funtoo.org/browse/FL-3410 |
I've done some research on this and a number of things could be causing the issue. Try running the following commands from the console: $ GPG_TTY=$(tty) Then see what it says. If pinentry is working OK, you should be prompted for a password. If the passphrase is already cached, you should just see text that says something like this: You need a passphrase to unlock the secret key for Anything else will indicate a problem. In my case, I reproduced the issue by not having an available signing key which prevented the default command the keychain uses to cache the passphrase into gpg-agent to fail. |
I struggled with this for a long time. What finally ended the pain was adding the '--stop others' option |
I got this same error with Keychain 2.8.1. My key was expired. |
@titanofold – thanks, this was my issue too. |
I have this in my .bashrc:
`
`
than i launch bash again, i insert my password and it works:
` |
Could you test this with the latest version of keychain, 2.8.4 and see if it is still a problem? |
I am seeing this, tested with the latest version of keychain. I believe (for me at least), this is caused by my version of gpg-agent, I think it is expected that
This, along with keychain unsetting GPG_AGENT_INFO before attempting to source it from the (empty) pidfile results in GPG being unable to use pinentry for my key. Commenting out line 657 fixes this issue for me. |
Just for completeness sake I ran into this error I had to update the permissions of my key to |
I had this problem, which took me a long time to fix. I am not really sure why it worked, but I adopted @ddoherty03 's suggestion of adding a --stop others to the command line and it seemed to work. The relevant fragment of my .bash_profile reads:
|
I also recently had problems with keychain printing |
Sigh, 7 months later and I am looking at the same error... After reading the comments, it seems like a more descriptive error message is in order. The program failed for some reason doesn't really help anyone. |
I also came across this oddly undescriptive error message. ❯ ssh milkshake
Last login: Sat Nov 6 22:23:38 2021 from 100.74.113.114
* Error: Problem adding; giving up The fix for me was running |
|
Worked for me as well. Apparently, if the permissions are misconfigured on SSH/GPG keys after initially being set correctly and subsequently added to keychain/pinentry, an This persists until the insecure changes are reversed using |
Yes hello? |
Would be great if keychain could report that the key was expired, rather than claiming it can't find |
I have updated the issue description to describe the common theme of not having descriptive error messages when a key is unable to be added. I think that this can be addressed and is a problem. Marking as in progress. |
I just fixed this in git master. keychain will now show any error output generated when failing to add a key as a warning, for both ssh and gpg. This will appear in all versions after 2.9.0_beta3. |
I have (according to http://www.funtoo.org/Keychain)
in my ~/.bash_profile.
source ~/.bash_profile
gives the following error:However, there is no error when this ~/.bash_profile is sourced by logging through ssh into the machine. Any idea what could be wrong ?
The text was updated successfully, but these errors were encountered: