{"id":17206326,"url":"https://github.com/dabutvin/pgp-commit","last_synced_at":"2025-09-04T18:21:05.172Z","repository":{"id":52421065,"uuid":"161823614","full_name":"dabutvin/pgp-commit","owner":"dabutvin","description":"PGP signing of commits with openpgp and nodegit","archived":false,"fork":false,"pushed_at":"2021-04-29T19:22:32.000Z","size":29,"stargazers_count":4,"open_issues_count":2,"forks_count":2,"subscribers_count":2,"default_branch":"master","last_synced_at":"2025-04-13T22:09:34.593Z","etag":null,"topics":["git","gpg","nodegit","openpgp","pgp-signing"],"latest_commit_sha":null,"homepage":"https://www.npmjs.com/package/pgp-commit","language":"JavaScript","has_issues":true,"has_wiki":null,"has_pages":null,"mirror_url":null,"source_name":null,"license":"mit","status":null,"scm":"git","pull_requests_enabled":true,"icon_url":"https://github.com/dabutvin.png","metadata":{"files":{"readme":"README.md","changelog":null,"contributing":null,"funding":null,"license":"LICENSE","code_of_conduct":null,"threat_model":null,"audit":null,"citation":null,"codeowners":null,"security":null,"support":null}},"created_at":"2018-12-14T18:11:57.000Z","updated_at":"2023-02-16T19:29:41.000Z","dependencies_parsed_at":"2022-09-17T04:11:27.613Z","dependency_job_id":null,"html_url":"https://github.com/dabutvin/pgp-commit","commit_stats":null,"previous_names":[],"tags_count":3,"template":false,"template_full_name":null,"repository_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/dabutvin%2Fpgp-commit","tags_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/dabutvin%2Fpgp-commit/tags","releases_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/dabutvin%2Fpgp-commit/releases","manifests_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/dabutvin%2Fpgp-commit/manifests","owner_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners/dabutvin","download_url":"https://codeload.github.com/dabutvin/pgp-commit/tar.gz/refs/heads/master","host":{"name":"GitHub","url":"https://github.com","kind":"github","repositories_count":248788933,"owners_count":21161727,"icon_url":"https://github.com/github.png","version":null,"created_at":"2022-05-30T11:31:42.601Z","updated_at":"2022-07-04T15:15:14.044Z","host_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub","repositories_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories","repository_names_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repository_names","owners_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners"}},"keywords":["git","gpg","nodegit","openpgp","pgp-signing"],"created_at":"2024-10-15T02:28:09.682Z","updated_at":"2025-04-13T22:09:41.373Z","avatar_url":"https://github.com/dabutvin.png","language":"JavaScript","funding_links":[],"categories":[],"sub_categories":[],"readme":"# PGP Commit\n\nSign a commit with openpgp and nodegit\n\n- https://github.com/nodegit/nodegit\n- https://github.com/openpgpjs/openpgpjs\n\n## Install\n\n```\nnpm install pgp-commit\n```\n\n## Example\n\nSee more examples in examples folder\n\n```js\nconst git = require('nodegit')\nconst pgpCommit = require('pgp-commit')\n\nrun()\n\nasync function run() {\n  // clone a repo\n  const repo = await git.Clone('https://github.com/owner/repo', '/temp/repo')\n  const commitMessage = 'add data to something'\n  const author = git.Signature.now('test', 'test@test.com')\n  const committer = git.Signature.now('test', 'test@test.com')\n\n  // make a change\n  fs.writeFileSync('/temp/repo/nothing', 'nothing')\n\n  // stage the change\n  const index = await repo.refreshIndex()\n  await index.addAll()\n  await index.write()\n\n  // make a signed commit\n  const commitId = await pgpCommit({\n    repo,\n    commitMessage,\n    author,\n    committer,\n    passphrase,\n    privateKey\n  })\n}\n```\n\n## Add your public GPG key to github\n\nsee https://help.github.com/articles/adding-a-new-gpg-key-to-your-github-account/\n\n## Get your private key from cmd line\n\n```\n$ gpg --export-secret-key -a \"username\"\n```\n","project_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fdabutvin%2Fpgp-commit","html_url":"https://awesome.ecosyste.ms/projects/github.com%2Fdabutvin%2Fpgp-commit","lists_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fdabutvin%2Fpgp-commit/lists"}