@@ -16,20 +16,20 @@ npm install pgp-commit
16
16
See more examples in examples folder
17
17
18
18
``` js
19
- const git = require (" nodegit" )
20
- const pgpCommit = require (" pgp-commit" )
19
+ const git = require (' nodegit' )
20
+ const pgpCommit = require (' pgp-commit' )
21
21
22
22
run ()
23
23
24
24
async function run () {
25
25
// clone a repo
26
- const repo = await git .Clone (" https://github.com/owner/repo" , " /temp/repo" )
27
- const commitMessage = " add data to something"
28
- const author = git .
Signature .
now (
" test" , " [email protected] " )
29
- const committer = git .
Signature .
now (
" test" , " [email protected] " )
26
+ const repo = await git .Clone (' https://github.com/owner/repo' , ' /temp/repo' )
27
+ const commitMessage = ' add data to something'
28
+ const author = git .
Signature .
now (
' test' , ' [email protected] ' )
29
+ const committer = git .
Signature .
now (
' test' , ' [email protected] ' )
30
30
31
31
// make a change
32
- fs .writeFileSync (" /temp/repo/nothing" , " nothing" )
32
+ fs .writeFileSync (' /temp/repo/nothing' , ' nothing' )
33
33
34
34
// stage the change
35
35
const index = await repo .refreshIndex ()
@@ -48,6 +48,12 @@ async function run() {
48
48
}
49
49
```
50
50
51
- ## Add your GPG key to github
51
+ ## Add your public GPG key to github
52
52
53
53
see https://help.github.com/articles/adding-a-new-gpg-key-to-your-github-account/
54
+
55
+ ## Get your private key from cmd line
56
+
57
+ ```
58
+ $ gpg --export-secret-key -a "username"
59
+ ```
0 commit comments