-
Notifications
You must be signed in to change notification settings - Fork 104
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Suggestion: provide a mechanism for users to specify the openssl path #108
Comments
Hi @jwatt this is something we have discussed before in and around this comment: #55 (comment) I'm not familiar with Can you talk more about how |
Hi @jmurty. Thanks for the reply and link to the previous discussion. Note that I'm just a casual user of yadm. That said, it seems like yadm is essentially a git wrapper that at its core invokes yadm, like transcrypt, is just a single file shell script. I had expected that Besides that, on reflection it probably wouldn't make sense to tell yadm about the openssl path if it's just passing on the args to transcrypt. Ignoring yadm for the moment, presumably if transcrypt were to add support for specifying an openssl path it would store it in a |
As you pointed out in #55 (comment), storing the path in the user's Perhaps storing the path in the per-repo |
Add the optional --openssl-path argument when initialising a repo to tell transcrypt to use an explicit path to the openssl binary, instead of using whatever version is on the user's path. The openssl path is now saved as a new transcrypt.openssl-path Git config local setting in the repository, alongside the other transcrypt settings like cipher, password etc. If the user provides --openssl-path this explicit path is stored in the local Git config, otherwise the default value 'openssl' is stored which will fall back to the default behaviour of finding openssl on the user's $PATH. The --openssl-path argument gets special treatment for upgrades: an --openssl-path argument value given along with --upgrade will replace the existing config setting, despite config settings normally being retained across upgrades.
Hi @jwatt in #111 I have taken a first pass at implementing an You can use the ./transcrypt --upgrade --yes --openssl-path=/usr/local/opt/openssl@1.1/bin/openssl Can you try this and see if it works for you? Be warned that I have only done initial testing. |
I reconsidered the feature that let users set or update a custom openssl path using the --upgrade flag. This was unusual behaviour: no other transcrypt settings could be altered during upgrade. Since it is somewhat likely a user will need or want to change their openssl path over a repository's lifetime, the help text now says how to do that using a standard git config-setting command.
Add the optional `--set-openssl-path` argument to tell transcrypt to use an explicit path to the openssl binary, instead of whatever version is found on the user's `$PATH`. The OpenSSL path can be changed on init, during an upgrade, or along with any other transcrypt command (even by itself). The openssl path is saved as a new `transcrypt.openssl-path` Git config local setting in the repository, alongside the other transcrypt settings like cipher, password etc.
Hi @jwatt I think the recently-merged For macOS users with newer, better versions of OpenSSL installed with Homebrew a command like the following will tell transcrypt to use that version instead of the one included with macOS: This implementation saves a Can you confirm this works for you with the latest code from |
# By James Murty (18) and others # Via GitHub (1) and James Murty (1) * main: (26 commits) Centralise load and save of password into functions #141 Fix date of 2.2.0 release Ensure tests use "main" as default branch name #143 Use OpenSSL for B64 encoding not `base64` which differs between Linux and Mac #140 Use core attributesFile from worktree (#137) Document `xxd` requirement, and make optional with OpenSSL < 3 (#138) Prepare for 2.2.0 release Fix when using OpenSSL 3 which no longer embeds salt in output (#135) Consolidate all git operation scripts into a single transcrypt script Fix handling of small files and files with null in first 8 bytes (#116) Improve command hint to fix secret files not encrypted in index (#120) (#130) Remove Ubuntu 16.04 LTS from test matrix (#123) Configure default Git branch name for macOS tests in GitHub Handle rename of primary branch from "master" to "main" Ensure Git index is up-to-date before dirty repo check #37 (#109) Fix incorrect salt when partially staged files are commited (#119) Use shorthand for grep options for broader compatibility (#121) Let user set a custom path to openssl #108 Install entire transcrypt script into repository Change version to indicate development "pre-release" status ... # Conflicts: # README.md # tests/_test_helper.bash # tests/test_cleanup.bats # tests/test_crypt.bats # tests/test_init.bats # tests/test_not_inited.bats # transcrypt
On macOS it would be useful to be able to tell
transcrypt
to use the Homebrew installedopenssl
, but I don't want to add/usr/local/opt/openssl/bin
toPATH
due to the potential for side affects. More specifically I'm hoping thatyadm
could pass any value set foryadm.openssl-program
in its configuration file along totranscrypt
in order to avoid the "deprecated key derivation used" warnings.The text was updated successfully, but these errors were encountered: