jpohjolainen / atom-gpg

5 stars 7 forks source link

Use multiple GPG keys #11

Open BrunoGoirand opened 3 years ago

BrunoGoirand commented 3 years ago

Hi, I am wondering whether there is something that should be fixed here...

Suppose I have two RSA keys:

Those two projects are located in my home directory ~/project_1 and ~/project_2.

I have created a gpg.recipients file:

When I work on project_1, I load the project into my treeview and I can encrypt or decrypt content with no issue. It works the same way when I work on project_2.

If I load both project_1, and project_2 in my treeview, it seems that the encryption key used is the one from the gpg.recipients file of the project located at the top of the treeview.

In order to come to this conclusion, I remove the unique entry from the gpg.recipients file of the project at the top of the treeview and I get the error message that says:

No GPG recipients defined.  
Add recipient user ids in the atom-gpg pakage settings or create '~/project_1//~/project_1/gpg.recipients' file with one user id per line.

Also, notice that the error message is writing two times the path of the gpg.recipients file it is looking for.

jpohjolainen commented 3 years ago

Hi,

Yes seems like it takes the gpg.recipients from the top most project dir that is open, and not the directory the file is in.

I will check if I can do something to this in the christmas holidays. It's just been very long time for touching this that I don't even remember how coffeescript worked and all the libs :) so will take some time.

BrunoGoirand commented 3 years ago

Hi, Super, thank you, I look forward to getting it fixed, I hope you will be able to get back into it easily.