prs
automatically tries to reuse SSH connections to greatly speed up
operations in a password store that has sync enabled.
Support for this is limited depending on the used operating system and remote
host. A list of requirements has been set up for this.
Based on this, prs
guesses whether connection reuse is supported and
automatically enables it when that is the case.
This feature uses the ControlPersist
feature within OpenSSH. An open connection
is stored in a file at /tmp/.prs-session--*
. OpenSSH manages the connection
and the file.
If you're experiencing problems with this feature, please disable it and open an issue.
This implementation is still limited and may be troublesome, it requires additional work. A better way to configure and determine whether connection reuse is supported should be implemented. Please see the following issues:
You must meet these requirements for connection reuse to be used:
- Password store must have sync enabled (with
git
) - Password store must use SSH remote
- Only supported on Unix platforms
- Environment variable
GIT_SSH_COMMAND
must not be set - All password store git remotes that use SSH must have whitelisted domain
The following hosts are whitelisted:
github.com
gitlab.com
To add a host to this whitelist, please contribute to this project or open an
issue. See SSH_PERSIST_HOST_WHITELIST
in
lib/src/util/git.rs
.
There's no need to manually disable this if you don't meet the requirements.
To disable this feature, you may set the GIT_SSH_COMMAND
variable:
# Use default ssh connection in git, disables prs connection reuse
export GIT_SSH_COMMAND=ssh