maxgoedjen / secretive

Store SSH keys in the Secure Enclave
MIT License
7.16k stars 157 forks source link

Empty/inaccessible `SecretAgent/Data` directory #486

Open djc opened 12 months ago

djc commented 12 months ago

I started looking at setting up git commit signing yesterday per the instructions in #441. However, when I look at my ~/Library/Containers/com.maxgoedjen.Secretive.SecretAgent dir using ls -l I get an error:

djc-2021 com.maxgoedjen.Secretive.SecretAgent $ ls -l
total 0
drwx------@ 14 djc  staff  448 Oct  6 10:00 Data
djc-2021 com.maxgoedjen.Secretive.SecretAgent $ cd Data 
djc-2021 Data $ sudo ls -al
total 0
ls: .: Operation not permitted

I've already tried killing the Secretive processes, but this doesn't appear to help. Adding a new key also doesn't seem to change anything.

djc commented 12 months ago

(Also, this happened after creating this issue:)

Screenshot 2023-10-06 at 10 09 53
maxgoedjen commented 11 months ago

What version are you using? I fixed something that sounds similar to this in the last update.

djc commented 11 months ago

I have "Version 2.3.1 (1.5638740552)".

torarnv commented 8 months ago

The reason for the ls: .: Operation not permitted is that Terminal.app (and in effect, zsh and the ls child processes) does not have access to read files of other applications. You've probably denied that permission in the past. You can reverse/change this in the system settings.

djc commented 8 months ago

@torarnv thanks for the feedback, that seems to work! I wonder if there's way I can avoid granting permission to all of VS Code and still use this with git in VS Code's Terminal tabs...

torarnv commented 8 months ago

A solution like outlined in https://github.com/maxgoedjen/secretive/issues/499#issuecomment-1900366271 would help with that.

djc commented 8 months ago

I think we would also need to write the socket.ssh value somewhere else, probably, to make that feasible? Presumably the git process would need access to the inode referred to by the socket.ssh name in SecretAgent/Data.