{"id":874,"date":"2021-08-28T15:25:08","date_gmt":"2021-08-28T14:25:08","guid":{"rendered":"https:\/\/editjournal.redakt.eu\/faxmodem\/?p=874"},"modified":"2023-02-28T20:09:43","modified_gmt":"2023-02-28T20:09:43","slug":"aws-codecommit-repository-does-not-exist","status":"publish","type":"post","link":"https:\/\/editjournal.redakt.eu\/faxmodem\/blog\/development\/aws-codecommit-repository-does-not-exist\/","title":{"rendered":"AWS CodeCommit: Repository does not exist"},"content":{"rendered":"<h3>Problem<\/h3>\n<blockquote>\n<p>Repository does not exist<br \/>\nfatal: Could not read from remote repository.<br \/>\nPlease make sure you have the correct access rights and the repository exists.<\/p>\n<\/blockquote>\n<h3>Solution<\/h3>\n<ol>\n<li>\n<p>Follow the <a href=\"https:\/\/docs.aws.amazon.com\/console\/codecommit\/connect-ssh-unix_np\">official documentation<\/a>: create a new IAM user and set up the SSH keys for that user. Alternatively, go to your repo and click Clone -&gt; Connection Steps to get to the documentation.<\/p>\n<\/li>\n<li>\n<p>Configure your local computer's or your server's <code>~\/.ssh\/config<\/code>: add your CodeCommit hostname, specify your user account name a.k.a. IAM SSH Key ID. Make sure you're using the &quot;SSH keys for AWS CodeCommit&quot; and not &quot;Access Keys&quot;<\/p>\n<\/li>\n<li>\n<p>Try connecting. If your repo is in <code>git-codecommit.eu-north-1.amazonaws.com<\/code>, then simply run <code>ssh git-codecommit.eu-north-1.amazonaws.com<\/code> and the response should be:<\/p>\n<blockquote>\n<p>You have successfully authenticated over SSH. You can use Git to interact with AWS CodeCommit. Interactive shells are not supported.Connection to git-codecommit.eu-north-1.amazonaws.com closed by remote host.<br \/>\nConnection to git-codecommit.eu-north-1.amazonaws.com closed.<\/p>\n<\/blockquote>\n<\/li>\n<li>\n<p>Try running <code>git fetch<\/code>. If it still doesn't work, you may be using multiple users in your <code>~\/.ssh\/config<\/code> under <code>Host git-codecommit.*.amazonaws.com<\/code> wildcard, and a wrong one must be matching. Try changing your remote from <code>ssh:\/\/git-codecommit.eu-north-1.amazonaws.com\/v1\/repos\/myrepo<\/code> to <code>ssh:\/\/SSH_KEY_ID@git-codecommit.eu-north-1.amazonaws.com\/v1\/repos\/myrepo<\/code><\/p>\n<\/li>\n<\/ol>\n","protected":false},"excerpt":{"rendered":"<p>Troubleshooting Amazon CodeCommit not letting you into your repository over an SSH connection.<\/p>\n","protected":false},"author":1,"featured_media":0,"comment_status":"open","ping_status":"open","sticky":false,"template":"","format":"standard","meta":{"footnotes":""},"categories":[706],"tags":[709,712],"class_list":["post-874","post","type-post","status-publish","format-standard","hentry","category-development","tag-aws","tag-git","entry"],"_links":{"self":[{"href":"https:\/\/editjournal.redakt.eu\/faxmodem\/wp-json\/wp\/v2\/posts\/874","targetHints":{"allow":["GET"]}}],"collection":[{"href":"https:\/\/editjournal.redakt.eu\/faxmodem\/wp-json\/wp\/v2\/posts"}],"about":[{"href":"https:\/\/editjournal.redakt.eu\/faxmodem\/wp-json\/wp\/v2\/types\/post"}],"author":[{"embeddable":true,"href":"https:\/\/editjournal.redakt.eu\/faxmodem\/wp-json\/wp\/v2\/users\/1"}],"replies":[{"embeddable":true,"href":"https:\/\/editjournal.redakt.eu\/faxmodem\/wp-json\/wp\/v2\/comments?post=874"}],"version-history":[{"count":7,"href":"https:\/\/editjournal.redakt.eu\/faxmodem\/wp-json\/wp\/v2\/posts\/874\/revisions"}],"predecessor-version":[{"id":1318,"href":"https:\/\/editjournal.redakt.eu\/faxmodem\/wp-json\/wp\/v2\/posts\/874\/revisions\/1318"}],"wp:attachment":[{"href":"https:\/\/editjournal.redakt.eu\/faxmodem\/wp-json\/wp\/v2\/media?parent=874"}],"wp:term":[{"taxonomy":"category","embeddable":true,"href":"https:\/\/editjournal.redakt.eu\/faxmodem\/wp-json\/wp\/v2\/categories?post=874"},{"taxonomy":"post_tag","embeddable":true,"href":"https:\/\/editjournal.redakt.eu\/faxmodem\/wp-json\/wp\/v2\/tags?post=874"}],"curies":[{"name":"wp","href":"https:\/\/api.w.org\/{rel}","templated":true}]}}