Skip to content
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

If pubring files are read-only, the tell command doesn't edit them, but also shows no warning that something went wrong #984

Open
kass-kass opened this issue Mar 29, 2023 · 0 comments

Comments

@kass-kass
Copy link

When the pubring files are read-only (for many reasons this can be the case, for example some source control systems like Perforce set all repo contents to read-only until they are "checked out"), git-secret does not edit them.

Therefore, editing the keyring with git secret tell ... should fail in this case and display an error to the user. Alternatively, it can ask something like "do you want to overwrite read-only file?".

However, currently, the command silently quits, and with no error message the user doesn't know that anything went wrong.

What are the steps to reproduce this issue?

  1. Set pubring.kbx and pubring.kbx~ files to read-only.
  2. Attempt to git secret tell to a new user.

What happens?

Nothing is displayed, pubring files are left untouched.

What were you expecting to happen?

An error message or overwrite dialog.

What versions of software are you using?

Operating system: (uname -a) 5.10.16.3-microsoft-standard-WSL2 #1 SMP Fri Apr 2 22:23:49 UTC 2021 x86_64 x86_64 x86_64 GNU/Linux

git-secret path: (which git-secret) /usr/bin/git-secret

git-secret version: (git secret --version) 0.5.0

git version: (git --version) 2.25.1

Shell type and version: ($SHELL --version) GNU bash, version 5.0.17(1)-release (x86_64-pc-linux-gnu)

gpg version: (gpg --version) gpg (GnuPG) 2.2.19 libgcrypt 1.8.5

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

1 participant