repomaa/autopass

Autopass doesn't parse any entry

Opened this issue · 12 comments

After installing autopass and puting the long key-id in the config file, I get this error

Error: folder/username is not in the password store.
Failed parsing entry 'folder/username':

Pass exited with error when reading from folder/username
/usr/bin/autopass:352:in `basename': no implicit conversion of Hash into String (TypeError)
	from /usr/bin/autopass:352:in `rescue in entry_from'
	from /usr/bin/autopass:343:in `entry_from'
	from /usr/bin/autopass:384:in `block in update_cache'
	from /usr/bin/autopass:382:in `each'
	from /usr/bin/autopass:382:in `update_cache'
	from /usr/bin/autopass:309:in `initialize'
	from /usr/bin/autopass:411:in `new'
	from /usr/bin/autopass:411:in `<main>'

I did a pass init 0x<longkeyid> for the setup of pass

does pass show folder/username work?

Yes, it works. I am able to use rofi-pass but not autopass ... Just to be sure, what is the format of the cache_key config option ? I tried :

cache_key: 0xLongKeyID
cache_key: 0xShortKeyID
cache_key: LongKeyID
cache_key: ShortKeyID

and all those variants as strings, encapsulated with ' ' without any success

i see. could it be, that you have set $PASSWORD_STORE_DIR but your autopass config doesn't reflect that?

"Error: folder/username is not in the password store." is definitely a pass error message.

Just to make sure: you're using the master branch?

Everything gpg accepts as a value for the --recipient option is accepted as cache_key. This isn't related to that though. It's simply a case of pass not being able to find your password store.

I installed autopass via AUR, the PKGBUILD is here so I think I am using the master branch. And I didn't set $PASSWORD_STORE_DIR, mine is still at ~/.password-store

Hum I just retrieved the last version of autopass and now I have another error

Failed parsing entry 'folder/username':
uninitialized constant PassBackend::Config
Did you mean?  RbConfig
               CONFIG
/usr/bin/autopass:352:in `basename': no implicit conversion of Hash into String (TypeError)
	from /usr/bin/autopass:352:in `rescue in entry_from'
	from /usr/bin/autopass:343:in `entry_from'
	from /usr/bin/autopass:388:in `block in update_cache'
	from /usr/bin/autopass:386:in `each'
	from /usr/bin/autopass:386:in `update_cache'
	from /usr/bin/autopass:309:in `initialize'
	from /usr/bin/autopass:415:in `new'
	from /usr/bin/autopass:415:in `<main>'

sorry, my bad. That was a typo

Oh something changed,

Failed parsing entry 'folder/username':
no implicit conversion of Symbol into String
/usr/bin/autopass:352:in `basename': no implicit conversion of Hash into String (TypeError)
	from /usr/bin/autopass:352:in `rescue in entry_from'
	from /usr/bin/autopass:343:in `entry_from'
	from /usr/bin/autopass:388:in `block in update_cache'
	from /usr/bin/autopass:386:in `each'
	from /usr/bin/autopass:386:in `update_cache'
	from /usr/bin/autopass:309:in `initialize'
	from /usr/bin/autopass:415:in `new'
	from /usr/bin/autopass:415:in `<main>'

hm, I'm pretty sure it's the same error, but stderr of the pass command is swallowed by IO.popen. Let's see.

@anhtuann: How about now?

Yes ! Now autopass opens ! I have a regex error when trying to copy/paste passwords but that's another issue. Thanks for the fix