@@ -16,20 +16,20 @@ npm install pgp-commit
1616See more examples in examples folder
1717
1818``` js
19- const git = require (" nodegit" )
20- const pgpCommit = require (" pgp-commit" )
19+ const git = require (' nodegit' )
20+ const pgpCommit = require (' pgp-commit' )
2121
2222run ()
2323
2424async function run () {
2525 // 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] ' )
3030
3131 // make a change
32- fs .writeFileSync (" /temp/repo/nothing" , " nothing" )
32+ fs .writeFileSync (' /temp/repo/nothing' , ' nothing' )
3333
3434 // stage the change
3535 const index = await repo .refreshIndex ()
@@ -48,6 +48,12 @@ async function run() {
4848}
4949```
5050
51- ## Add your GPG key to github
51+ ## Add your public GPG key to github
5252
5353see 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