{"id":2104,"date":"2021-06-10T16:12:10","date_gmt":"2021-06-10T13:12:10","guid":{"rendered":"https:\/\/www.scalahosting.com\/kb\/?p=2104"},"modified":"2025-11-27T09:39:45","modified_gmt":"2025-11-27T07:39:45","slug":"403-forbidden-error-message-when-pushing-to-a-github-repository","status":"publish","type":"post","link":"https:\/\/www.scalahosting.com\/kb\/403-forbidden-error-message-when-pushing-to-a-github-repository\/","title":{"rendered":"GitHub Push 403 Forbidden Error: How to Fix"},"content":{"rendered":"<p><span style=\"font-weight: 400;\">There are two main causes for a <\/span><b>\u201c403 Forbidden\u201d error message<\/b><span style=\"font-weight: 400;\"> when attempting to push amendments to a GitHub repository. The first is relatively simple to resolve and simply involves checking to ensure your <\/span><b>GitHub password<\/b><span style=\"font-weight: 400;\"> is correct.<\/span><\/p>\n<p><span style=\"font-weight: 400;\">If the error persists, it is likely that you have to use a <\/span><b>different HTTPS address in your Git client<\/b><span style=\"font-weight: 400;\">. For this error, you will not even be prompted to enter a password, making it simpler to diagnose.<\/span><\/p>\n<h2><span style=\"font-weight: 400;\">Rectifying the \u201c403 Forbidden\u201d Error Message<\/span><\/h2>\n<p><span style=\"font-weight: 400;\">There are two methods to fix t<\/span><b>he HTTPS address to resolve the 403 error in question;<\/b><\/p>\n<ul>\n<li style=\"font-weight: 400;\" aria-level=\"1\"><b>Method 1.<\/b><span style=\"font-weight: 400;\"> Use SSH to push the changes to GitHub. First, connect to your hosting server via SSH then follow the <\/span><a href=\"https:\/\/docs.github.com\/en\/get-started\/getting-started-with-git\/managing-remote-repositories\"><span style=\"font-weight: 400;\">instructions Github provides<\/span><\/a><span style=\"font-weight: 400;\"> to add a remote repository.<\/span><\/li>\n<li style=\"font-weight: 400;\" aria-level=\"1\"><b>Method 2. <\/b><span style=\"font-weight: 400;\">You can also directly modify the HTTPS address via <\/span><a href=\"https:\/\/www.scalahosting.com\/blog\/what-is-ssh-and-how-to-use-it\/\"><b>SSH<\/b><\/a><span style=\"font-weight: 400;\">. Once logged in, use the \u201dgit remote set-url origin &#8220;<\/span><span style=\"font-weight: 400;\">https:\/\/github-username@github.com\/github-username\/github-repository-name.git<\/span><span style=\"font-weight: 400;\">&#8221; instruction.<\/span><\/li>\n<\/ul>\n<p><span style=\"font-weight: 400;\">Replace<\/span><b> \u201cgithub-username\u201d and \u201cgithub-repository-name\u201d<\/b><span style=\"font-weight: 400;\"> with your own GitHub information.<\/span><\/p>\n<p><span style=\"font-weight: 400;\">Once this is done, you should be able to<\/span><b> push changes to the repository with no further errors.<\/b><\/p>\n","protected":false},"excerpt":{"rendered":"<p>There are two main causes for a \u201c403 Forbidden\u201d error message when attempting to push amendments to a GitHub repository. The first is relatively simple to resolve and simply involves checking to ensure your GitHub password is correct. If the error persists, it is likely that you have to use a different HTTPS address in [&hellip;]<\/p>\n","protected":false},"author":3,"featured_media":0,"comment_status":"open","ping_status":"open","sticky":false,"template":"","format":"standard","meta":{"_acf_changed":false,"_seopress_robots_primary_cat":"none","_seopress_titles_title":"GitHub Push 403 Forbidden Error: How to Fix | ScalaHosting KB","_seopress_titles_desc":"","_seopress_robots_index":"","_seopress_analysis_target_kw":"","footnotes":""},"categories":[33],"tags":[],"class_list":["post-2104","post","type-post","status-publish","format-standard","hentry","category-software"],"acf":[],"_links":{"self":[{"href":"https:\/\/www.scalahosting.com\/kb\/wp-json\/wp\/v2\/posts\/2104","targetHints":{"allow":["GET"]}}],"collection":[{"href":"https:\/\/www.scalahosting.com\/kb\/wp-json\/wp\/v2\/posts"}],"about":[{"href":"https:\/\/www.scalahosting.com\/kb\/wp-json\/wp\/v2\/types\/post"}],"author":[{"embeddable":true,"href":"https:\/\/www.scalahosting.com\/kb\/wp-json\/wp\/v2\/users\/3"}],"replies":[{"embeddable":true,"href":"https:\/\/www.scalahosting.com\/kb\/wp-json\/wp\/v2\/comments?post=2104"}],"version-history":[{"count":4,"href":"https:\/\/www.scalahosting.com\/kb\/wp-json\/wp\/v2\/posts\/2104\/revisions"}],"predecessor-version":[{"id":5804,"href":"https:\/\/www.scalahosting.com\/kb\/wp-json\/wp\/v2\/posts\/2104\/revisions\/5804"}],"wp:attachment":[{"href":"https:\/\/www.scalahosting.com\/kb\/wp-json\/wp\/v2\/media?parent=2104"}],"wp:term":[{"taxonomy":"category","embeddable":true,"href":"https:\/\/www.scalahosting.com\/kb\/wp-json\/wp\/v2\/categories?post=2104"},{"taxonomy":"post_tag","embeddable":true,"href":"https:\/\/www.scalahosting.com\/kb\/wp-json\/wp\/v2\/tags?post=2104"}],"curies":[{"name":"wp","href":"https:\/\/api.w.org\/{rel}","templated":true}]}}