{"id":89,"date":"2019-02-25T17:34:19","date_gmt":"2019-02-25T16:34:19","guid":{"rendered":"https:\/\/camilomatajira.wordpress.com\/?p=89"},"modified":"2025-06-10T18:36:42","modified_gmt":"2025-06-10T18:36:42","slug":"how-to-solve-gitlabs-error-loading-key-stdin-invalid-format","status":"publish","type":"post","link":"https:\/\/camilo.matajira.com\/?p=89","title":{"rendered":"How to solve Gitlab&#8217;s &#8216;Error loading key &#8220;(stdin)&#8221;: invalid format&#8217;"},"content":{"rendered":"<p>If you receive an error like this in your CICD pipeline<br \/>\n$ echo &#8220;${GITLAB_CI_SSHKEY}&#8221; | ssh-add &#8211; &gt; \/dev\/null<br \/>\nIdentity added: (stdin) ((stdin))<\/p>\n<p>Try adding the complete private ssh key, include &#8220;&#8212;&#8211;BEGIN RSA PRIVATE KEY&#8212;&#8211;&#8221; and &#8220;&#8212;&#8211;END RSA PRIVATE KEY&#8212;&#8211;&#8221;<br \/>\n$ echo &#8220;${GITLAB_CI_SSHKEY}&#8221; | ssh-add &#8211; &gt; \/dev\/null<br \/>\nIdentity added: (stdin) ((stdin))<\/p>\n<p>&#8212;&#8211;BEGIN RSA PRIVATE KEY&#8212;&#8211;<br \/>\nxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxx<br \/>\nxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxx<br \/>\nxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxx<br \/>\n&#8212;&#8211;END RSA PRIVATE KEY&#8212;&#8211;<\/p>\n","protected":false},"excerpt":{"rendered":"<p>If you receive an error like this in your CICD pipeline $ echo &#8220;${GITLAB_CI_SSHKEY}&#8221; | ssh-add &#8211; &gt; \/dev\/null Identity added: (stdin) ((stdin)) Try adding the complete private ssh key, include &#8220;&#8212;&#8211;BEGIN RSA PRIVATE KEY&#8212;&#8211;&#8221; and &#8220;&#8212;&#8211;END RSA PRIVATE KEY&#8212;&#8211;&#8221; $ echo &#8220;${GITLAB_CI_SSHKEY}&#8221; | ssh-add &#8211; &gt; \/dev\/null Identity added: (stdin) ((stdin)) &#8212;&#8211;BEGIN RSA PRIVATE&#8230;<\/p>\n","protected":false},"author":2,"featured_media":213,"comment_status":"closed","ping_status":"open","sticky":false,"template":"","format":"standard","meta":{"footnotes":""},"categories":[3],"tags":[16,26,38,63],"class_list":["post-89","post","type-post","status-publish","format-standard","has-post-thumbnail","hentry","category-debugging","tag-bash","tag-debugging","tag-gitlab","tag-ssh"],"_links":{"self":[{"href":"https:\/\/camilo.matajira.com\/index.php?rest_route=\/wp\/v2\/posts\/89","targetHints":{"allow":["GET"]}}],"collection":[{"href":"https:\/\/camilo.matajira.com\/index.php?rest_route=\/wp\/v2\/posts"}],"about":[{"href":"https:\/\/camilo.matajira.com\/index.php?rest_route=\/wp\/v2\/types\/post"}],"author":[{"embeddable":true,"href":"https:\/\/camilo.matajira.com\/index.php?rest_route=\/wp\/v2\/users\/2"}],"replies":[{"embeddable":true,"href":"https:\/\/camilo.matajira.com\/index.php?rest_route=%2Fwp%2Fv2%2Fcomments&post=89"}],"version-history":[{"count":1,"href":"https:\/\/camilo.matajira.com\/index.php?rest_route=\/wp\/v2\/posts\/89\/revisions"}],"predecessor-version":[{"id":542,"href":"https:\/\/camilo.matajira.com\/index.php?rest_route=\/wp\/v2\/posts\/89\/revisions\/542"}],"wp:featuredmedia":[{"embeddable":true,"href":"https:\/\/camilo.matajira.com\/index.php?rest_route=\/wp\/v2\/media\/213"}],"wp:attachment":[{"href":"https:\/\/camilo.matajira.com\/index.php?rest_route=%2Fwp%2Fv2%2Fmedia&parent=89"}],"wp:term":[{"taxonomy":"category","embeddable":true,"href":"https:\/\/camilo.matajira.com\/index.php?rest_route=%2Fwp%2Fv2%2Fcategories&post=89"},{"taxonomy":"post_tag","embeddable":true,"href":"https:\/\/camilo.matajira.com\/index.php?rest_route=%2Fwp%2Fv2%2Ftags&post=89"}],"curies":[{"name":"wp","href":"https:\/\/api.w.org\/{rel}","templated":true}]}}