{"id":4122,"date":"2025-01-30T16:47:00","date_gmt":"2025-01-30T16:47:00","guid":{"rendered":"https:\/\/www.gubatron.com\/blog\/?p=4122"},"modified":"2025-01-30T16:50:56","modified_gmt":"2025-01-30T16:50:56","slug":"screw-configuring-gpg-to-sign-git-commits-do-it-with-your-same-ssh-key-like-this","status":"publish","type":"post","link":"https:\/\/www.gubatron.com\/blog\/screw-configuring-gpg-to-sign-git-commits-do-it-with-your-same-ssh-key-like-this\/","title":{"rendered":"Screw configuring GPG to sign git commits, do it with your same SSH key like this"},"content":{"rendered":"<p>GPG gives a lot of shit on macos for some reason.<\/p>\n<p>It&#8217;s best to just add the same SSH authentication key you have on github as a &#8220;Signing Key&#8221; in your github account signing configuration.<\/p>\n<p><a href=\"https:\/\/github.com\/settings\/keys\">Go to Settings &gt; SSH and GPG Keys<\/a><\/p>\n<p><img data-recalc-dims=\"1\" loading=\"lazy\" decoding=\"async\" class=\"alignnone size-full wp-image-4126\" src=\"https:\/\/i0.wp.com\/www.gubatron.com\/blog\/wp-content\/uploads\/2025\/01\/Screenshot-2025-01-30-at-9.49.45%E2%80%AFAM.png?resize=640%2C367&#038;ssl=1\" alt=\"\" width=\"640\" height=\"367\" srcset=\"https:\/\/i0.wp.com\/www.gubatron.com\/blog\/wp-content\/uploads\/2025\/01\/Screenshot-2025-01-30-at-9.49.45%E2%80%AFAM.png?w=960&amp;ssl=1 960w, https:\/\/i0.wp.com\/www.gubatron.com\/blog\/wp-content\/uploads\/2025\/01\/Screenshot-2025-01-30-at-9.49.45%E2%80%AFAM.png?resize=300%2C172&amp;ssl=1 300w, https:\/\/i0.wp.com\/www.gubatron.com\/blog\/wp-content\/uploads\/2025\/01\/Screenshot-2025-01-30-at-9.49.45%E2%80%AFAM.png?resize=768%2C441&amp;ssl=1 768w\" sizes=\"auto, (max-width: 640px) 100vw, 640px\" \/><\/p>\n<p>You can then configure your github client and repo to use that key to sign in two ways.<\/p>\n<ol>\n<li>On the command line<\/li>\n<\/ol>\n<pre>$ git config [--global] gpg.format ssh\n$ git config [--global] user.signingkey ~\/.ssh\/id_rsa.pub\n$ git config [--global] commit.gpgsign true\n<\/pre>\n<ol>\n<li>On the repo&#8217;s .git\/config file<\/li>\n<\/ol>\n<pre>[user]\n        name = gubatron\n        email = gubatron@gmail.com\n        signingkey = \/Users\/gubatron\/.ssh\/id_rsa.pub\n[github]\n        user = gubatron\n[gpg]\n        format = ssh\n[commit]\n        gpgsign = true\n<\/pre>\n","protected":false},"excerpt":{"rendered":"<p>GPG gives a lot of shit on macos for some reason. It&#8217;s best to just add the same SSH authentication key you have on github as a &#8220;Signing Key&#8221; in your github account signing configuration. Go to Settings &gt; SSH and GPG Keys You can then configure your github client and repo to use that [&hellip;]<\/p>\n","protected":false},"author":1,"featured_media":4123,"comment_status":"closed","ping_status":"closed","sticky":false,"template":"","format":"standard","meta":{"jetpack_post_was_ever_published":false,"_jetpack_newsletter_access":"","_jetpack_dont_email_post_to_subs":false,"_jetpack_newsletter_tier_id":0,"_jetpack_memberships_contains_paywalled_content":false,"_jetpack_memberships_contains_paid_content":false,"footnotes":"","jetpack_publicize_message":"","jetpack_publicize_feature_enabled":true,"jetpack_social_post_already_shared":true,"jetpack_social_options":{"image_generator_settings":{"template":"highway","default_image_id":0,"font":"","enabled":false},"version":2}},"categories":[15,43],"tags":[484],"class_list":["post-4122","post","type-post","status-publish","format-standard","has-post-thumbnail","hentry","category-code","category-linux","tag-git"],"jetpack_publicize_connections":[],"jetpack_featured_media_url":"https:\/\/i0.wp.com\/www.gubatron.com\/blog\/wp-content\/uploads\/2025\/01\/ssh_sign.jpg?fit=736%2C441&ssl=1","jetpack_sharing_enabled":true,"jetpack_shortlink":"https:\/\/wp.me\/p5Unzf-14u","jetpack-related-posts":[{"id":3150,"url":"https:\/\/www.gubatron.com\/blog\/how-to-add-an-existing-git-repository-to-github\/","url_meta":{"origin":4122,"position":0},"title":"How to add an existing GIT repository to github.","author":"gubatron","date":"August 31, 2013","format":false,"excerpt":"Most of the times, it makes more sense to start working on something that slowly transforms into the beginning of a project that deserves to be on github. This post is about creating a local repository and putting it on github. 1. First we must convert the main local folder\u2026","rel":"","context":"In &quot;Code&quot;","block_context":{"text":"Code","link":"https:\/\/www.gubatron.com\/blog\/category\/code\/"},"img":{"alt_text":"","src":"","width":0,"height":0},"classes":[]},{"id":1998,"url":"https:\/\/www.gubatron.com\/blog\/startkeychain-bash-utility-to-start-ssh-agent\/","url_meta":{"origin":4122,"position":1},"title":"startKeychain &#8211; bash utility to start ssh-agent","author":"gubatron","date":"June 3, 2010","format":false,"excerpt":"For my (and your) future reference, here's a function to put on your .bashrc or .bash_profile, you can invoke it later at any time to start\/re-start your ssh-agent. [bash] function startKeychain { killall ssh-agent rm ~\/.keychain\/* keychain id_rsa HOSTNAME=`hostname` source ~\/.keychain\/${HOSTNAME}-sh } [\/bash] Then at any time, the \"command\" startKeychain\u2026","rel":"","context":"In &quot;Code&quot;","block_context":{"text":"Code","link":"https:\/\/www.gubatron.com\/blog\/category\/code\/"},"img":{"alt_text":"","src":"","width":0,"height":0},"classes":[]},{"id":593,"url":"https:\/\/www.gubatron.com\/blog\/ssh-add-l-cannot-connect-to-your-agent\/","url_meta":{"origin":4122,"position":2},"title":"ssh-add -l -> Cannot connect to your agent.","author":"gubatron","date":"September 21, 2007","format":false,"excerpt":"keychain not working for ya... you run ssh-agent but ssh-add won't add the keys. This is probably because your SSH_AGENT_PID and SSH_AUTH_SOCK variables are incorrect... so I recommend you put something like this on your .bashrc to initialize your ssh-agent correctly: export SSH_AGENT_PID= export SSH_AUTH_SOCK= #make sure no old agents\u2026","rel":"","context":"In &quot;Code&quot;","block_context":{"text":"Code","link":"https:\/\/www.gubatron.com\/blog\/category\/code\/"},"img":{"alt_text":"","src":"","width":0,"height":0},"classes":[]},{"id":2722,"url":"https:\/\/www.gubatron.com\/blog\/add-ssh-identities-to-your-ssh-agent-when-you-start-your-bash-session\/","url_meta":{"origin":4122,"position":3},"title":"add ssh identities to your ssh agent when you start your bash session","author":"gubatron","date":"April 28, 2012","format":false,"excerpt":"Put this somewhere on your .bash_profile [bash] function addSSHIdentities() { pushd ~\/.ssh #add all your keys here ssh-add some_private_key ssh-add some_private_key_2 ssh-add some_private_key_3 ... ssh-add some_private_key_N popd } function startSSHAgent() { SSH_AGENT_PROCESSES=`ps aux | grep ssh-agent | grep -v grep | wc -l` if [ $SSH_AGENT_PROCESSES -gt 0 ] then\u2026","rel":"","context":"In \"posix\"","block_context":{"text":"posix","link":"https:\/\/www.gubatron.com\/blog\/tag\/posix\/"},"img":{"alt_text":"","src":"","width":0,"height":0},"classes":[]},{"id":481,"url":"https:\/\/www.gubatron.com\/blog\/svn-cant-create-tunnel-the-system-cannot-find-the-file-specified\/","url_meta":{"origin":4122,"position":4},"title":"svn: Can&#8217;t create tunnel: The system cannot find the file specified.","author":"gubatron","date":"March 15, 2007","format":false,"excerpt":"I was trying to checkout a project from a subversion repository using Eclipse's Subversive, and I was having problems with a subversion url that starts with \"svn+ssh:\/\/\" This means all the transport has to be done using a \"ssh\" agent. Eclipse's Subclipse plugin was giving me the error: svn: Can't\u2026","rel":"","context":"In &quot;Code&quot;","block_context":{"text":"Code","link":"https:\/\/www.gubatron.com\/blog\/category\/code\/"},"img":{"alt_text":"","src":"","width":0,"height":0},"classes":[]},{"id":2068,"url":"https:\/\/www.gubatron.com\/blog\/bitbucket-or-github\/","url_meta":{"origin":4122,"position":5},"title":"Bitbucket or Github?","author":"gubatron","date":"September 28, 2010","format":false,"excerpt":"This week we have to make a final choice of what technology will be used to replace our somewhat big subversion repository (2 Gigs). Huge imports are beginning to be a pain and we're tired of the .svn folders and not being able to commit if the central server is\u2026","rel":"","context":"In &quot;Geeklife&quot;","block_context":{"text":"Geeklife","link":"https:\/\/www.gubatron.com\/blog\/category\/geeklife\/"},"img":{"alt_text":"","src":"","width":0,"height":0},"classes":[]}],"_links":{"self":[{"href":"https:\/\/www.gubatron.com\/blog\/wp-json\/wp\/v2\/posts\/4122","targetHints":{"allow":["GET"]}}],"collection":[{"href":"https:\/\/www.gubatron.com\/blog\/wp-json\/wp\/v2\/posts"}],"about":[{"href":"https:\/\/www.gubatron.com\/blog\/wp-json\/wp\/v2\/types\/post"}],"author":[{"embeddable":true,"href":"https:\/\/www.gubatron.com\/blog\/wp-json\/wp\/v2\/users\/1"}],"replies":[{"embeddable":true,"href":"https:\/\/www.gubatron.com\/blog\/wp-json\/wp\/v2\/comments?post=4122"}],"version-history":[{"count":3,"href":"https:\/\/www.gubatron.com\/blog\/wp-json\/wp\/v2\/posts\/4122\/revisions"}],"predecessor-version":[{"id":4127,"href":"https:\/\/www.gubatron.com\/blog\/wp-json\/wp\/v2\/posts\/4122\/revisions\/4127"}],"wp:featuredmedia":[{"embeddable":true,"href":"https:\/\/www.gubatron.com\/blog\/wp-json\/wp\/v2\/media\/4123"}],"wp:attachment":[{"href":"https:\/\/www.gubatron.com\/blog\/wp-json\/wp\/v2\/media?parent=4122"}],"wp:term":[{"taxonomy":"category","embeddable":true,"href":"https:\/\/www.gubatron.com\/blog\/wp-json\/wp\/v2\/categories?post=4122"},{"taxonomy":"post_tag","embeddable":true,"href":"https:\/\/www.gubatron.com\/blog\/wp-json\/wp\/v2\/tags?post=4122"}],"curies":[{"name":"wp","href":"https:\/\/api.w.org\/{rel}","templated":true}]}}