From bohmer at gmail.com Thu Oct 6 14:44:58 2022 From: bohmer at gmail.com (=?UTF-8?Q?Knut_Olav_B=C3=B8hmer?=) Date: Thu, 6 Oct 2022 16:44:58 +0200 Subject: pass grep --color=never Message-ID: Hi, I would like to enable output without color. I also have on the wish list to print passfile_dir with a leading slash. best regards -- Knut Olav B?hmer -------------- next part -------------- A non-text attachment was scrubbed... Name: 0001-Make-cmd_grep-understand-color.patch Type: text/x-patch Size: 1533 bytes Desc: not available URL: From t.fitschen at indiscale.com Thu Oct 6 15:36:16 2022 From: t.fitschen at indiscale.com (t.fitschen at indiscale.com) Date: Thu, 6 Oct 2022 17:36:16 +0200 Subject: pass grep --color=never In-Reply-To: References: Message-ID: <20221006153616.xjdrajqbuvhqbptb@belial> Hi Knut, hi everyone, regarding the no-color output: I, too, think it would be nice to have no-color outout (I would like to use this for CI pipeline logs). --color=never as a GREPOPTIONS works as expected. However, pass's cmd_grep prints the colored file name anyways. More colored output comes from `tree`. tree's output is colored by the LS_COLORS variable. I think it would be nice to implement the https://no-color.org/ standard for pass which means to locally override LS_COLORS, remove any colored output generated by pass itself and also append --color=never to the GREPOPTIONS. It this is desired I can provide a patch. Regards Timm Fitschen On Thu, Oct 06, 2022 at 04:44:58PM +0200, Knut Olav B?hmer wrote: > Hi, > > I would like to enable output without color. > I also have on the wish list to print passfile_dir with a leading slash. > > best regards > -- > Knut Olav B?hmer -- Herr/Mr Timm Fitschen (er/he) Development T: +49 551 288 76 48-3 E: t.fitschen at indiscale.com I: indiscale.com IndiScale - Wir machen individuelles Datenmanagement skalierbar. IndiScale GmbH Lotzestra?e 22a 37083 G?ttingen Amtsgericht G?ttingen ? HRB 205721 Gesch?ftsf?hrung Henrik tom W?rden -------------- next part -------------- A non-text attachment was scrubbed... Name: signature.asc Type: application/pgp-signature Size: 906 bytes Desc: not available URL: From t-passwd at girst.at Thu Oct 6 15:44:17 2022 From: t-passwd at girst.at (Tobias Girstmair) Date: Thu, 6 Oct 2022 17:44:17 +0200 Subject: pass grep --color=never In-Reply-To: References: Message-ID: On Thu, Oct 06, 2022 at 04:44:58PM +0200, Knut Olav B?hmer wrote: >Hi, > >I would like to enable output without color. >I also have on the wish list to print passfile_dir with a leading slash. i'm assuming you need this for passing pass' output to another program. how about using something like the code below. 'test -t' checks whether a file descriptor is a tty. this would keep interactive output the same, while automatically making pipelines work. if [[ -t 1 ]] then color=always else color=never fi # ... grepresults=$(... | grep --color="$color" ...) if that's too verbose for you: color=never test -t 1 && color=always From bohmer at gmail.com Thu Oct 6 16:55:14 2022 From: bohmer at gmail.com (=?UTF-8?Q?Knut_Olav_B=C3=B8hmer?=) Date: Thu, 6 Oct 2022 18:55:14 +0200 Subject: pass grep --color=never In-Reply-To: References: Message-ID: On Thu, Oct 6, 2022 at 5:44 PM Tobias Girstmair wrote: > > On Thu, Oct 06, 2022 at 04:44:58PM +0200, Knut Olav B?hmer wrote: > >Hi, > > > >I would like to enable output without color. > >I also have on the wish list to print passfile_dir with a leading slash. > > i'm assuming you need this for passing pass' output to another program. > > how about using something like the code below. 'test -t' checks whether > a file descriptor is a tty. this would keep interactive output the same, > while automatically making pipelines work. > > if [[ -t 1 ]] > then > color=always > else > color=never > fi > > # ... > > grepresults=$(... | grep --color="$color" ...) > > > if that's too verbose for you: > > color=never > test -t 1 && color=always consider this pass grep .| less -R Sometimes want colored output even if the output is a pipe. But I would still consider your idea an improvement. Regards -- Knut Olav B?hmer From bohmer at gmail.com Fri Oct 7 06:36:03 2022 From: bohmer at gmail.com (=?UTF-8?Q?Knut_Olav_B=C3=B8hmer?=) Date: Fri, 7 Oct 2022 08:36:03 +0200 Subject: pass grep --color=never In-Reply-To: References: Message-ID: On Thu, Oct 6, 2022 at 6:55 PM Knut Olav B?hmer wrote: > > On Thu, Oct 6, 2022 at 5:44 PM Tobias Girstmair wrote: > > > > On Thu, Oct 06, 2022 at 04:44:58PM +0200, Knut Olav B?hmer wrote: > > >Hi, > > > > > >I would like to enable output without color. > > >I also have on the wish list to print passfile_dir with a leading slash. > > > > i'm assuming you need this for passing pass' output to another program. > > > > how about using something like the code below. 'test -t' checks whether > > a file descriptor is a tty. this would keep interactive output the same, > > while automatically making pipelines work. > > > > if [[ -t 1 ]] > > then > > color=always > > else > > color=never > > fi > > > > # ... > > > > grepresults=$(... | grep --color="$color" ...) > > > > > > if that's too verbose for you: > > > > color=never > > test -t 1 && color=always > > consider this > > pass grep .| less -R > > Sometimes want colored output even if the output is a pipe. But I > would still consider your idea an improvement. test -t should be used if --color=auto -- Knut Olav B?hmer 41 000 108 From bohmer at gmail.com Fri Oct 7 07:03:24 2022 From: bohmer at gmail.com (=?UTF-8?Q?Knut_Olav_B=C3=B8hmer?=) Date: Fri, 7 Oct 2022 09:03:24 +0200 Subject: pass grep --color=never In-Reply-To: References: Message-ID: Patch which respects "--color=auto" On Fri, Oct 7, 2022 at 8:36 AM Knut Olav B?hmer wrote: > > On Thu, Oct 6, 2022 at 6:55 PM Knut Olav B?hmer wrote: > > > > On Thu, Oct 6, 2022 at 5:44 PM Tobias Girstmair wrote: > > > > > > On Thu, Oct 06, 2022 at 04:44:58PM +0200, Knut Olav B?hmer wrote: > > > >Hi, > > > > > > > >I would like to enable output without color. > > > >I also have on the wish list to print passfile_dir with a leading slash. > > > > > > i'm assuming you need this for passing pass' output to another program. > > > > > > how about using something like the code below. 'test -t' checks whether > > > a file descriptor is a tty. this would keep interactive output the same, > > > while automatically making pipelines work. > > > > > > if [[ -t 1 ]] > > > then > > > color=always > > > else > > > color=never > > > fi > > > > > > # ... > > > > > > grepresults=$(... | grep --color="$color" ...) > > > > > > > > > if that's too verbose for you: > > > > > > color=never > > > test -t 1 && color=always > > > > consider this > > > > pass grep .| less -R > > > > Sometimes want colored output even if the output is a pipe. But I > > would still consider your idea an improvement. > > test -t should be used if --color=auto > > -- > Knut Olav B?hmer > 41 000 108 -- Knut Olav B?hmer 41 000 108 -------------- next part -------------- A non-text attachment was scrubbed... Name: 0001-Make-cmd_grep-understand-color.patch Type: text/x-patch Size: 1586 bytes Desc: not available URL: From ngraves at ngraves.fr Tue Oct 11 18:17:36 2022 From: ngraves at ngraves.fr (Nicolas Graves) Date: Tue, 11 Oct 2022 20:17:36 +0200 Subject: contrib/emacs: adding a variable for file extensions Message-ID: <8735buw7gf.fsf@ngraves.fr> Hi! I was trying to use the fork of password-store named passage (using encryption with age instead of gpg), and setup an emacs config for it. Since the fork stays quite close to the original password-store, changes that need to be made are actually quite small, and mainly concern changes related to "gpg" strings that need to be replaced by "age" strings. Would it be possible to add a defvar or a defcustom variable with this string, to be able to use the same emacs package instead of forking it ? Would a patch implementing this change for contrib/emacs be merged (I was thinking about a variable password-store-file-extension) ? -- Best regards, Nicolas Graves From ngraves at ngraves.fr Thu Oct 13 21:31:07 2022 From: ngraves at ngraves.fr (Nicolas Graves) Date: Thu, 13 Oct 2022 23:31:07 +0200 Subject: [PATCH] emacs: Add variable password-store-file-extension. Message-ID: <20221013213107.24749-1-ngraves@ngraves.fr> --- contrib/emacs/password-store.el | 9 +++++++-- 1 file changed, 7 insertions(+), 2 deletions(-) diff --git a/contrib/emacs/password-store.el b/contrib/emacs/password-store.el index 6561eb1..72aee3e 100644 --- a/contrib/emacs/password-store.el +++ b/contrib/emacs/password-store.el @@ -66,6 +66,9 @@ (defvar password-store-timeout-timer nil "Timer for clearing clipboard.") +(defvar password-store-file-extension ".gpg" + "File extension to expect in the password store.") + (defun password-store-timeout () "Number of seconds to wait before clearing the password. @@ -187,7 +190,8 @@ Nil arguments are ignored. Output is discarded." (defun password-store--entry-to-file (entry) "Return file name corresponding to ENTRY." - (concat (expand-file-name entry (password-store-dir)) ".gpg")) + (concat (expand-file-name entry (password-store-dir)) + password-store-file-extension)) (defun password-store--file-to-entry (file) "Return entry name corresponding to FILE." @@ -218,7 +222,8 @@ ENTRY is the name of a password-store entry." (if (file-directory-p dir) (delete-dups (mapcar 'password-store--file-to-entry - (directory-files-recursively dir ".+\\.gpg\\'")))))) + (directory-files-recursively + dir (concat ".+\\" password-store-file-extension "\\'"))))))) ;;;###autoload (defun password-store-edit (entry) -- 2.38.0 From volkan at yazi.ci Fri Oct 14 15:18:52 2022 From: volkan at yazi.ci (=?UTF-8?B?Vm9sa2FuIFlhesSxY8Sx?=) Date: Fri, 14 Oct 2022 17:18:52 +0200 Subject: Decrypt fails due to SIGPIPE in large files Message-ID: Hello, When the encrypted content is bigger than what is reported by `ulimit -p`, `gpg -d` exits with 141 causing `pass -c` to fail: $ ulimit -p 8 $ dd if=/dev/urandom bs=8193 count=1 | gpg -e -r XXX -o ~/.password-store/test.gpg --yes && pass show -c test; echo $? 1+0 records in 1+0 records out 8193 bytes (8.2 kB, 8.0 KiB) copied, 0.000199462 s, 41.1 MB/s 141 $ dd if=/dev/urandom bs=8192 count=1 | gpg -e -r XXX -o ~/.password-store/test.gpg --yes && pass show -c test; echo $? 1+0 records in 1+0 records out 8192 bytes (8.2 kB, 8.0 KiB) copied, 0.000193793 s, 42.3 MB/s Copied test to clipboard. Will clear in 45 seconds. 0 In particular, these are the suspects causing the failure: $ cat $(which pass) ... set -o pipefail ... pass="$($GPG -d "${GPG_OPTS[@]}" "$passfile" | tail -n +${selected_line} | head -n 1)" || exit $? ... Is there a way `pass` can workaround this limitation? Kind regards. From doug.hs at proton.me Sat Oct 15 23:59:13 2022 From: doug.hs at proton.me (Douglas Silva) Date: Sat, 15 Oct 2022 23:59:13 +0000 Subject: [PATCH] Add support for Windows clipboard (WSL) Message-ID: This makes the -c (copy to clipboard) option work on WSL, by using the clip.exe command if it's available. I picked $WSL_DISTRO_NAME to test for it. Note that I didn't set "paste_cmd" or "display_name". I couldn't find any paste command for Windows, and I don't understand what they're used for. --- src/password-store.sh | 4 +++- 1 file changed, 3 insertions(+), 1 deletion(-) diff --git a/src/password-store.sh b/src/password-store.sh index 22e818f..7f64b68 100755 --- a/src/password-store.sh +++ b/src/password-store.sh @@ -155,7 +155,9 @@ check_sneaky_paths() { # clip() { - if [[ -n $WAYLAND_DISPLAY ]] && command -v wl-copy &> /dev/null; then + if [[ -n $WSL_DISTRO_NAME ]] && command -v clip.exe &> /dev/null; then + local copy_cmd=( clip.exe ) + elif [[ -n $WAYLAND_DISPLAY ]] && command -v wl-copy &> /dev/null; then local copy_cmd=( wl-copy ) local paste_cmd=( wl-paste -n ) if [[ $X_SELECTION == primary ]]; then -- 2.34.1 From doug.hs at proton.me Tue Oct 18 04:08:52 2022 From: doug.hs at proton.me (Douglas Silva) Date: Tue, 18 Oct 2022 04:08:52 +0000 Subject: [PATCH] Add support for Windows clipboard (WSL) In-Reply-To: <20221016185206.yayxr2awgsskva5n@pasture> References: <20221016185206.yayxr2awgsskva5n@pasture> Message-ID: Ok, now we're using the snapd method for detecting WSL, and I've tested your suggested "paste_cmd". ## paste_cmd One problem. The Get-Clipboard cmdlet works as expected when you execute it from the shell, but not when called by pass. After 45 seconds the clipboard will still contain the copied password, with one addition: an empty newline. I couldn't yet figure out why. ## copy_cmd I also tried to replace the older "clip.exe" with the Set-Clipboard cmdlet, but it only broke the functionality (clipboard stays empty). Am I using these Powershell cmdlets wrong? --- diff --git a/src/password-store.sh b/src/password-store.sh index 22e818f..57d296d 100755 --- a/src/password-store.sh +++ b/src/password-store.sh @@ -155,7 +155,10 @@ check_sneaky_paths() { # clip() { - if [[ -n $WAYLAND_DISPLAY ]] && command -v wl-copy &> /dev/null; then + if [[ -e "/proc/sys/fs/binfmt_misc/WSLInterop" ]]; then + local copy_cmd=( clip.exe ) + local paste_cmd=( powershell.exe -Command Get-Clipboard ) + elif [[ -n $WAYLAND_DISPLAY ]] && command -v wl-copy &> /dev/null; then local copy_cmd=( wl-copy ) local paste_cmd=( wl-paste -n ) if [[ $X_SELECTION == primary ]]; then --- From frrobert at frrobert.com Wed Oct 19 23:42:57 2022 From: frrobert at frrobert.com (Robert Bower) Date: Wed, 19 Oct 2022 16:42:57 -0700 Subject: 2nd computer Message-ID: <6aa59427f31f3d3f44c8a82a024ef871@frrobert.com> Good afternoon, How should you setup pass on a second machine? I currently have pass installed on my desktop computer and an android client installed on my phone. I have a git repository and I am able to sync my desktop to the repository and the android client to the repository. I am trying to also use pass on my notebook. I can get the repository cloned on my machine and open it but I can never do a push or pull. I don't think I am setting up pass correctly on the notebook. -- Thanks, Robert Bower W9RWB WRPH745 From trice at posteo.net Thu Oct 20 00:34:32 2022 From: trice at posteo.net (Tim Rice) Date: Thu, 20 Oct 2022 00:34:32 +0000 Subject: 2nd computer In-Reply-To: <6aa59427f31f3d3f44c8a82a024ef871@frrobert.com> References: <6aa59427f31f3d3f44c8a82a024ef871@frrobert.com> Message-ID: Hi Robert, I have Git ride on top of ssh. Have you tested ssh between the notebook and your Git repo? The most obvious thing is that maybe the location of your Git repo does not have a copy of your notebook's public key yet. Another possibility is that ssh and/or Git is misconfigured on the notebook. Using `GIT_SSH_COMMAND='ssh -vvv' git ...` or so would be a next troubleshooting step once you know ssh is working. Pass just sends all its Git subcommands and arguments through to Git, so you can just work with the repo directly. I would only start suspecting pass if you've proven to yourself that Git without pass works fine. Eg see what happens when you go into your passwordstore directory and try a `git pull` or `git push`. I would also check `git remote -v`. tl;dr Start by getting ssh and Git working. Worry about pass later. ~ Tim On Wed, Oct 19, 2022 at 04:42:57PM -0700, Robert Bower wrote: >Good afternoon, > >How should you setup pass on a second machine? > >I currently have pass installed on my desktop computer and an android >client installed on my phone. I have a git repository and I am able to >sync my desktop to the repository and the android client to the >repository. > >I am trying to also use pass on my notebook. I can get the repository >cloned on my machine and open it but I can never do a push or pull. I >don't think I am setting up pass correctly on the notebook. > > >-- >Thanks, > >Robert Bower >W9RWB >WRPH745 From zach at aoede.xyz Thu Oct 20 01:08:44 2022 From: zach at aoede.xyz (Zach) Date: Wed, 19 Oct 2022 18:08:44 -0700 Subject: 2nd computer In-Reply-To: <6aa59427f31f3d3f44c8a82a024ef871@frrobert.com> References: <6aa59427f31f3d3f44c8a82a024ef871@frrobert.com> Message-ID: <20221020010844.eqiiblsvdxoaz6ad@linux-box> On 2022-10-19 4:42pm, Robert Bower wrote: > How should you setup pass on a second machine? I use syncthing to sync the ~/.password-store and ~/.gnupg directories between machines. https://syncthing.net/ From stpavlenko at kolabnow.ch Thu Oct 20 11:16:04 2022 From: stpavlenko at kolabnow.ch (noneofyourbusiness) Date: Thu, 20 Oct 2022 13:16:04 +0200 Subject: [PATCH] src/password-store.sh: remove non-POSIX -v flag from rm Message-ID: <20221020111602.6440-1-stpavlenko@kolabnow.ch> otherwise it'll fail with minimal but compliant implementations of rm this came to my attention when I tried to remove an entry Signed-off-by: noneofyourbusiness --- src/password-store.sh | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/src/password-store.sh b/src/password-store.sh index 22e818f..cb85f8d 100755 --- a/src/password-store.sh +++ b/src/password-store.sh @@ -337,7 +337,7 @@ cmd_init() { if [[ $# -eq 1 && -z $1 ]]; then [[ ! -f "$gpg_id" ]] && die "Error: $gpg_id does not exist and so cannot be removed." - rm -v -f "$gpg_id" || exit 1 + rm -f "$gpg_id" || exit 1 if [[ -n $INNER_GIT_DIR ]]; then git -C "$INNER_GIT_DIR" rm -qr "$gpg_id" git_commit "Deinitialize ${gpg_id}${id_path:+ ($id_path)}." @@ -584,7 +584,7 @@ cmd_delete() { [[ $force -eq 1 ]] || yesno "Are you sure you would like to delete $path?" - rm $recursive -f -v "$passfile" + rm $recursive -f "$passfile" set_git "$passfile" if [[ -n $INNER_GIT_DIR && ! -e $passfile ]]; then git -C "$INNER_GIT_DIR" rm -qr "$passfile" -- 2.38.0