grahamking / kip

Command line script to keep usernames/passwords in gnupg encrypted text files.
GNU General Public License v3.0
22 stars 6 forks source link

Nicer error messages #17

Open bartTC opened 11 years ago

bartTC commented 11 years ago

Kip displays a good error description, but there is no need to also write out the whole python traceback. As a user it wouldnt help me, just more confusing.

Just do this if I add --verbose or so.

martin ~/Dropbox/Lincoln Loop devs/secrets $ ./kip get vimeo.com
gpg: Entschlüsselung fehlgeschlagen: Geheimer Schlüssel ist nicht vorhanden
Traceback (most recent call last):
  File "./kip", line 519, in <module>
    sys.exit(main())
  File "./kip", line 107, in main
    retcode = CMDS[args.cmd](args)
  File "./kip", line 114, in cmd_get
    return show(args.filepart, args.is_print)
  File "./kip", line 310, in show
    username, password, notes = extract(filename)
  File "./kip", line 354, in extract
    username = parts[1]
IndexError: list index out of range
bartTC commented 11 years ago

The actual error here might be in kip, that it can't handle gracefully that the private key is not valid for the kip db.

grahamking commented 11 years ago

Could you translate: "gpg: Entschlüsselung fehlgeschlagen: Geheimer Schlüssel ist nicht vorhanden"

Also, how can I reproduce?

bartTC commented 11 years ago

"Secret key not valid". Try to delete your key files.

grahamking commented 11 years ago

Try to delete your key files

Is this a trick?

bartTC commented 11 years ago

No, I think thats how I discovered this. I did not symlinked my dotfiles yet. You can make a backup if you want.