Giter VIP home page Giter VIP logo

atom-gpg's Introduction

atom-gpg package

GPG Encryption for Atom. Encrypts, decrypts and signs selected text.

Install

Dependencies

  • gpg
$ apm install atom-gpg

Or install trough Atom Packages.

Settings

  • Gpg Executable

    Path to GPG binary. Defaults to 'gpg'

  • Gpg Home Dir

    Path to GPG key directory.

  • Gpg Recipients

    Recipient User IDs seperated by comma (,). Add your own User ID here so you can decrypt text.

  • Gpg Recipients File

    File of recipient User IDs that are appended to Gpg Recipients. If only filename is given, it's searched from project workdir or same directory as text buffer file is in.

Usage

Select text and press alt-shift-e to encrypt, alt-shift-d to decrypt and alt-shift-s to sign. If no text is selected, operations are done on whole buffer. Note: keymap changed on 0.7.0 from ctrl-shift to alt-shift.

Optionally you can also use context menu with right mouse button and select either GPG Encrypt, GPG Decrypt or GPG Sign. Same options can be found under menu Packages -> GPG.

You can encrypt, decrypt and sign multiple selections.

NOTE: If Atom fails to find GPG in the PATH, you can set the path to the binary in Settings page!

Recipients

You need to specify recipients to encryption. You can either specify them in Settings Gpg recipients or have gpg.recipients (name of the file can be changed in the settings) file in the same directory or in root of Git repo. User IDs in the file will be appended to recipients define in the Settings.

YAML files

When encrypting secrets in YAML files, atom-gpg will add '|' character and indent the following lines:

yaml

atom-gpg's People

Contributors

bartg95 avatar cheekyhalf avatar jpohjolainen avatar zipkid avatar

Stargazers

 avatar  avatar  avatar  avatar  avatar

Watchers

 avatar  avatar

atom-gpg's Issues

Not clear how to edit settings

This is a great addition! However, it doesn't simply work on a standard Ubuntu setup. I see in the docs there are settings, but it's not clear where or how to change. (path to file for example?).

Before I dig to figure it out, I thought I'd add an issue here. Most packages have a button for changing [ * Settings ]

In atom-gpg, since it doesn't use a standard [ * Settings ] button, it's not clear where or how to change configurable settings? Any help in the documentation would be good.

Although, the best solution IMO, is to include the functionality for a [ * Settings ] button. An example package that has configurable settings is: Linter.

CTRL-SHIFT-D conflicts with atom core keybinding

The Atom Core plugin defines CTRL-SHIFT-D as "Duplicate" (editor:duplicate-lines) and this behavior overrides the atom-gpg command to decrypt.

Even after re-mapping decryption to a different, unconflicted key sequence, however, it is not triggering the action (though Packages->atom-gpg->Decrypt works as expected). This is possible user error and I will continue to explore.

Use multiple GPG keys

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.

Private key prompt at decryption

Hi,

It would be great if we could have a prompt for private key decryption when we need to decipher or sign some text... Is it possible with your GnuPG solution? For now, I have an error from 'gpg' telling me that no passwords are given...

I would also appreciate a "no selection" encryption method, that is, if no text is selected, then encryption / decryption / signature should occur on the entire current document. It would save a ctrl+A! What do you think about it?

Thanks!

Uncaught TypeError: Cannot read property 'stdin' of undefined

[Enter steps to reproduce:]

  1. Select text
  2. Right-click and select GPG Encrypt from drop-down menu

I am not sure I have set this up right, but in Settings I have the following:
Gpg Executable
/Users/dp/.gnupg

Gpg Home Dir
/Users/dp/.gnupg

Gpg Recipients
/Users/dp/.gnupg

Gpg Recipients File
/Users/dp/.gnupg

Atom: 1.21.1 x64
Electron: 1.6.15
OS: Mac OS X 10.12.6
Thrown From: atom-gpg package 0.6.0

Stack Trace

Uncaught TypeError: Cannot read property 'stdin' of undefined

At /Users/dp/.atom/packages/atom-gpg/lib/gpg.coffee:41

TypeError: Cannot read property 'stdin' of undefined
    at gpgCommand (/packages/atom-gpg/lib/gpg.coffee:41:13)
    at /packages/atom-gpg/lib/gpg.coffee:99:3)
    at Object.run (/packages/atom-gpg/lib/main.coffee:116:7)
    at /packages/atom-gpg/lib/main.coffee:23:42)
    at CommandRegistry.handleCommandEvent (/Applications/Atom.app/Contents/Resources/app/src/command-registry.js:381:36)
    at CommandRegistry.dispatch (/Applications/Atom.app/Contents/Resources/app/src/command-registry.js:266:23)
    at AtomEnvironment.module.exports.AtomEnvironment.dispatchContextMenuCommand (/Applications/Atom.app/Contents/Resources/app/src/atom-environment.js:1354:34)
    at EventEmitter.outerCallback (/Applications/Atom.app/Contents/Resources/app/src/application-delegate.js:348:31)
    at emitThree (events.js:116:13)
    at EventEmitter.emit (events.js:194:7)

Commands

     -4:10.5.0 core:confirm (input.hidden-input)
     -3:58.5.0 core:backspace (input.hidden-input)
     -0:56.3.0 core:paste (input.hidden-input)
     -0:55.3.0 core:undo (input.hidden-input)
     -0:54 core:paste (input.hidden-input)
     -0:53.1.0 core:backspace (input.hidden-input)
     -0:50.7.0 core:paste (input.hidden-input)
  2x -0:50 core:backspace (input.hidden-input)
     -0:47.6.0 core:paste (input.hidden-input)
     -0:46.9.0 core:backspace (input.hidden-input)
     -0:40.2.0 core:cut (input.hidden-input)
  3x -0:38 core:backspace (input.hidden-input)
     -0:28.3.0 atom-gpg:encrypt-selections (div.line)

Non-Core Packages

atom-beautify 0.30.4 
atom-gpg 0.6.0 
change-case 0.6.5 
color-picker 2.2.5 
delete-lines 0.5.0 
file-icons 2.1.9 
highlight-selected 0.13.1 
Hydrogen 2.0.1 
json-converter 0.2.4 
minimap 4.29.3 
multi-cursor 2.1.5 
pretty-json 1.6.4 
regex-railroad-diagram 0.19.3 
tablr 1.8.3 
wordcount 2.10.4 

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    ๐Ÿ–– Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. ๐Ÿ“Š๐Ÿ“ˆ๐ŸŽ‰

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google โค๏ธ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.