From de974270320aa9878d8e6429948cd77e968d108a Mon Sep 17 00:00:00 2001 From: zawz Date: Wed, 4 Aug 2021 22:11:16 +0200 Subject: [PATCH] update doc --- README.md | 50 +++++++++++++++++++++++++++++++++++++++++++------- 1 file changed, 43 insertions(+), 7 deletions(-) diff --git a/README.md b/README.md index 1180f94..27e0a79 100644 --- a/README.md +++ b/README.md @@ -15,7 +15,8 @@ Requires: Optional: - screen (key caching and clipboard time) -- openssh (for remote files) +- lftp (for ftps remote files) +- curl (for WebDAV remote files) - zenity (GUI prompt) - kdialog (better GUI prompt in KDE) - xclip (copy on X) @@ -29,7 +30,7 @@ From [zpkg](https://github.com/zawwz/zpkg) package repository Requires [lxsh](https://github.com/zawwz/lxsh) -Clone this repository then run `make install` +Clone this repository then run `sudo make install` # Use @@ -57,14 +58,36 @@ zpass will load by default the file `.config/zpass/default.conf` in your home di ### Configuring remote file -You can configure zpass to use a file on a remote server. -You need SSH access to the target machine.
-Here is an example configuration: +You can configure zpass to use a file on a remote server.
+Multiple methods of remote access can be used: +- SSH+SCP (requires SSH key configured) +- SFTP (requires SSH key configured) +- FTPS +- WebDAV (note: only HTTPS, not HTTP) + +SFTP and WebDAV are the recommended options, as they are the easiest, most secure and most stable options.
+SFTP is the easiest to use as you only need a configured SSH access to a machine, +however if you want as little delay as possible, you should use WebDAV. + +### SFTP example + ``` -ZPASS_REMOTE_ADDR=user@example.com +ZPASS_REMOTE_METHOD=sftp +ZPASS_REMOTE_ADDR=example.com +ZPASS_REMOTE_USER=user ZPASS_SSH_ID=~/.ssh/id_rsa ``` +### WebDAV example + +``` +ZPASS_REMOTE_METHOD=webdav +ZPASS_REMOTE_ADDR=example.com +ZPASS_PATH=zpass +ZPASS_REMOTE_USER=user +ZPASS_REMOTE_PASSWORD=supersecretpassword +``` + ### Making the cache volatile If you are caching keys, by default zpass uses `~/.cache` as a caching path. @@ -73,7 +96,7 @@ leaving a file containing the key in plaintext.
This can be fixed by pointing the cache path to a volatile filesystem.
For example: ``` -ZPASS_CACHE_PATH=/tmp/zpasscache +ZPASS_CACHE_PATH=$XDG_RUNTIME_DIR/zpasscache ``` # Troubleshooting @@ -81,3 +104,16 @@ ZPASS_CACHE_PATH=/tmp/zpasscache ### Prompt keeps appearing even with correct password Make sure your gpg configuration is correct, you can run `gpg -c < /dev/null` to check + +### I can't get a remote file to work + +First verify that you can connect to the remote server with the appropriate protocol by using a client. +Then check that you have the correct rights to the target file (`$ZPASS_PATH/$ZPASS_FILE.tar.gpg`). + +If you're attempting the create the file and the folder `$ZPASS_PATH` doesn't exist, +make sure you have correct rights to create said folder. + +### I'm encountering another bug + +Generate a debug build (`make debug`) and run with environment `DEBUG=true` set, +then send the full output as an issue.