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

[feature-request] Recognize current path when revealing file(s) #925

Open
cybex-dev opened this issue Aug 23, 2022 · 3 comments
Open

[feature-request] Recognize current path when revealing file(s) #925

cybex-dev opened this issue Aug 23, 2022 · 3 comments
Assignees

Comments

@cybex-dev
Copy link

not a bug., Feature / aesthetic request

What are the steps to reproduce this issue?

  1. git-secret add functions/.runtime.confg
  2. rm functions/.runtime.confg
  3. cd functions
  4. git-secret reveal

What happens?

Failed to detect file(s) at path inside of repo.

What were you expecting to happen?

(detect current path) and reveal file(s)

Any logs, error output, etc?

git-secret: abort: cannot find file to decrypt: /path/to/folder/server/functions/functions/.runtimeconfig.json.secret

Any other comments?

If this feature / addition was considered but ultimately discarded due to sub-directories could have their own secrets, fair enough. On the other hand, being multiple directories in, I could call git add ... successfully, but git-secret (reveal) would not function the same way.

What versions of software are you using?

Operating system: Linux archtower 5.18.12-arch1-1 #1 SMP PREEMPT_DYNAMIC Fri, 15 Jul 2022 15:33:02 +0000 x86_64 GNU/Linux

git-secret path: /usr/bin/git-secret

git-secret version: 0.5.0

git version: git version 2.37.1

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

gpg version: gpg (GnuPG) 2.2.36

@mihaigalos
Copy link

I managed to get around this by temporarily creating a secret in the top most folder in the repo and moving it to the desired location. The secret could then be revealed correctly.

It is still, imho, a bug if we follow the Principle of least Astonishment / Don't make me think.

@joshrabinowitz
Copy link
Collaborator

joshrabinowitz commented Mar 17, 2023

After reading this report more carefully, it appears as if git-secret is correct that the file functions/.runtimeconfig.json.secret does not exist because git secret hide was never run

Nevertheless, doing the following should work, we test this automated tests:

git-secret add functions/.runtime.confg
git-secret hide # NOTE WE ADDED THIS
rm functions/.runtime.confg
WE DO NOT CD INTO functions/
git-secret reveal

@joshrabinowitz
Copy link
Collaborator

closing because this cannot be work as expected using steps indicated by OP. See #903 for better bug report about using reval in repo subdirectories, and #905 for a fix (which is in master but has not yet been put into a new release)

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

4 participants