gopass show -o returns more than just the password.

Created on 10 May 2020  Â·  5Comments  Â·  Source: gopasspw/gopass

Version: gopass 1.9.1 (2020-05-10 11:42:40) go1.14.2 linux amd64

With the recent version of gopass the option gopass show -o returns more than just the password:

gopass show -o foo/123.abc
✔ Copied foo/123.abc to clipboard. Will clear in 45 seconds.
password123

This broke my shell scripts which relied on obtaining just a raw password value from the show -o option.

It also seems to be copying the password to the clipboard which is redundant with the -c option and makes it unusable in shell scripts as it always publishes an OS notification when it copies to clipboard.

Is this an intentional change?

EDIT

In fact it seems that the gopass 1.9.1 version is broken - the show command doesn't return anything and just copies things to the clipboard, I downgraded to 1.9.0 and everything works.

All 5 comments

This happens only if you have set autoclip to true.
Without autoclip it seems to work as expected.

The purpose of autoclip is to always copy the password to the clipboard, without having to specify -c.

You can add -f to avoid the autoclip behaviour.

Having autoclip fail gracefully was being discussed in #1329 and I think we should try to implement that.

I guess #1353 is probably a duplicate.

So I guess #1355 should make autoclip handle scripts more gracefully.

Someone please verify this works as expected.

So I guess #1355 should make autoclip handle scripts more gracefully.

Someone please verify this works as expected.

Just checked out https://github.com/dominikschulz/gopass/tree/fix/issue-1352 and it is working fine with bash on Ubuntu 20.04, thanks!

# gopass mypassword
✔ Copied mypassword to clipboard. Will clear in 45 seconds.

# echo $(gopass mypassword)
mysecret

Thanks for reporting back.

I'll try to get another patch release out soon.

Was this page helpful?
0 / 5 - 0 ratings

Related issues

prune998 picture prune998  Â·  6Comments

doronbehar picture doronbehar  Â·  4Comments

FlorinAndrei picture FlorinAndrei  Â·  7Comments

jungle-boogie picture jungle-boogie  Â·  7Comments

blaggacao picture blaggacao  Â·  5Comments