{"id":18555893,"url":"https://github.com/ianonymous3000/gpg-github-tutorial","last_synced_at":"2026-01-29T10:03:03.896Z","repository":{"id":209419854,"uuid":"724002220","full_name":"iAnonymous3000/GPG-GitHub-Tutorial","owner":"iAnonymous3000","description":"A comprehensive step-by-step tutorial for beginners on how to generate, add, and use GPG keys with GitHub.","archived":false,"fork":false,"pushed_at":"2024-11-19T05:12:52.000Z","size":13,"stargazers_count":2,"open_issues_count":0,"forks_count":0,"subscribers_count":1,"default_branch":"main","last_synced_at":"2025-04-08T12:05:47.968Z","etag":null,"topics":["devsecops","github","gpg"],"latest_commit_sha":null,"homepage":"","language":null,"has_issues":true,"has_wiki":null,"has_pages":null,"mirror_url":null,"source_name":null,"license":"cc-by-sa-4.0","status":null,"scm":"git","pull_requests_enabled":true,"icon_url":"https://github.com/iAnonymous3000.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,"governance":null,"roadmap":null,"authors":null,"dei":null,"publiccode":null,"codemeta":null}},"created_at":"2023-11-27T07:38:22.000Z","updated_at":"2024-11-19T17:37:48.000Z","dependencies_parsed_at":"2023-11-29T01:42:51.932Z","dependency_job_id":"e8d8f251-b565-46b7-b327-b412392972df","html_url":"https://github.com/iAnonymous3000/GPG-GitHub-Tutorial","commit_stats":null,"previous_names":["ianonymous3000/gpg-github-tutorial"],"tags_count":0,"template":false,"template_full_name":null,"purl":"pkg:github/iAnonymous3000/GPG-GitHub-Tutorial","repository_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/iAnonymous3000%2FGPG-GitHub-Tutorial","tags_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/iAnonymous3000%2FGPG-GitHub-Tutorial/tags","releases_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/iAnonymous3000%2FGPG-GitHub-Tutorial/releases","manifests_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/iAnonymous3000%2FGPG-GitHub-Tutorial/manifests","owner_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners/iAnonymous3000","download_url":"https://codeload.github.com/iAnonymous3000/GPG-GitHub-Tutorial/tar.gz/refs/heads/main","sbom_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/iAnonymous3000%2FGPG-GitHub-Tutorial/sbom","scorecard":null,"host":{"name":"GitHub","url":"https://github.com","kind":"github","repositories_count":286080680,"owners_count":28875446,"icon_url":"https://github.com/github.png","version":null,"created_at":"2022-05-30T11:31:42.601Z","updated_at":"2026-01-29T09:47:23.353Z","status":"ssl_error","status_checked_at":"2026-01-29T09:47:19.357Z","response_time":59,"last_error":"SSL_read: unexpected eof while reading","robots_txt_status":"success","robots_txt_updated_at":"2025-07-24T06:49:26.215Z","robots_txt_url":"https://github.com/robots.txt","online":false,"can_crawl_api":true,"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":["devsecops","github","gpg"],"created_at":"2024-11-06T21:28:11.426Z","updated_at":"2026-01-29T10:03:03.866Z","avatar_url":"https://github.com/iAnonymous3000.png","language":null,"funding_links":[],"categories":[],"sub_categories":[],"readme":"# GPG GitHub Tutorial for Beginners\n\n## Introduction\n\nThis tutorial provides a step-by-step guide on using GPG signatures with GitHub to cryptographically sign commits for identity verification and integrity. Digitally signing commits with GPG allows you to generate tamper-evident hashes that validate author identity rather than encrypting the contents. This allows others to trust that specific approved GPG keys were used to produce commits pushed from a GitHub account.\n\n## Prerequisites  \n\nBefore starting, make sure you have the following:  \n\n- GPG command line tools installed\n- A GitHub account  \n- Git command line tools installed\n- A text editor like Visual Studio Code\n\n## Generate a GPG Key Pair  \n\n```\ngpg --full-generate-key\n```\n\n(Select option 1 for RSA and RSA)  \n(Select 4096-bit key size when prompted)\n\n(Select whether the key should expire)  \n\n(Enter GitHub email address for user ID)\n\n(Enter a secure passphrase) \n\n## Get Your GPG Public Key ID  \n\n```\ngpg --list-secret-keys --keyid-format LONG\n```\n\n(Identify and copy the GPG key ID you'd like to use)\n\n## Export GPG Public Key  \n\n```\ngpg --armor --export [email used for key gen] \n```\n\n(Copy key beginning with -----BEGIN PGP PUBLIC KEY BLOCK-----)\n\n## Add Your GPG Key to GitHub   \n\n1. Go to GitHub --\u003e Settings --\u003e SSH and GPG keys   \n2. Click New GPG key, paste your public key, and click Add GPG key\n\n## Configure Git to Use GPG\n\n```\ngit config --global user.signingkey YOUR-KEY-ID   \n\ngit config --global gpg.program gpg  \n```\n\n## Signing Commits with GPG  \n\n```\ngit commit -S -m \"your commit message\"\n``` \n(Enter your GPG passphrase when prompted)\n\n## Verify Signatures on Cloned Repo\n\n```\ngit verify-commit LocallySignedCommitHash\n```\n\nGreen verified message indicates successful PGP signing.\n\n## Amending Commits\n\nIf you forget to sign commit initially:\n\n```  \ngit commit --amend -S -m \"commit message\"\n```\n\n## Back Up Your GPG Private Key   \n\n1. Export private key:   \n   ```   \n   gpg --export-secret-keys [KEY_ID] \u003e my-private-key-backup.gpg\n   ```\n2. Store backup in a very safe \u0026 secure place (e.g. encrypted USB drive)   \n\n## Additional Resources    \n\n- [GitHub Docs on GPG Commit Signing](https://help.github.com/articles/signing-commits-with-gpg/)\n- [GNU Privacy Guard Documentation](https://gnupg.org/documentation/index.html)\n","project_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fianonymous3000%2Fgpg-github-tutorial","html_url":"https://awesome.ecosyste.ms/projects/github.com%2Fianonymous3000%2Fgpg-github-tutorial","lists_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fianonymous3000%2Fgpg-github-tutorial/lists"}