{"id":124,"date":"2009-08-30T16:21:59","date_gmt":"2009-08-30T22:21:59","guid":{"rendered":"http:\/\/www.n8williams.com\/devblog\/?p=124"},"modified":"2009-09-02T00:14:02","modified_gmt":"2009-09-02T06:14:02","slug":"bash-git-receive-pack-command-not-found","status":"publish","type":"post","link":"https:\/\/n8williams.com\/devblog\/general_dev\/bash-git-receive-pack-command-not-found","title":{"rendered":"bash: git-receive-pack: command not found, git-upload-pack"},"content":{"rendered":"<p>When doing a push to master I was getting<\/p>\n<p>bash: git-upload-pack: command not found<br \/>\nbash: git-receive-pack: command not found<\/p>\n<p>For me my server was not recognizing the git command. I had to add the server paths to my local git config<\/p>\n<p>receivepack = \/home3\/&lt;myusername&gt;\/local\/git-1.6.4\/git-receive-pack<br \/>\nuploadpack = \/home3\/&lt;myusername&gt;\/local\/git-1.6.4\/git-upload-pack<\/p>\n<p>where the config file is in the .git directory of my project on local. This line is under the entry for the remote I had set up called &#8216;origin&#8217; (use the path on the server where the git install is located and make sure git-receive-pack is in there on the server).<\/p>\n<p><strong>BUT,I think the following is be the better solution.<\/strong> Editing the .bashrc worked like a charm. I added the following line to my .bashrc file (look in \/etc or you home\/ directory if on a shared server) and things worked swimmingly.<\/p>\n<p>export PATH=&#8221;$PATH:\/home3\/&lt;myusername&gt;\/local\/git-1.6.4&#8243;<\/p>\n<p>replace \/home3\/&#8230; with whatever the path to your git install may be.<\/p>\n<p>I&#8217;m still not clear on why the path would be different for a bash ssh command, and a client sending a request over ssh to the server. It seems as if even though my server environment variable $PATH includes the path to the git install, the $PATH variables does not include that path if the git commands are invoked over a remote ssh request (like my eclipse working with git). But if I was logged in on a bash shell, the git commands worked great, with no &#8216;command not found&#8217; errors. Make sure when you install git, that you understand how to make your server recognize the git executable commands, both from the bash and also from remote requests. I&#8217;m still unclear on the difference between 1) editing the $PATH environment variable to include your git directory 2) Editing the .bashrc with the export $PATH setting. 3) Making symbolic links from the bin folder to your git install.<\/p>\n<p>See <a title=\"remote get-receive-pack fix\" href=\"http:\/\/stackoverflow.com\/questions\/225291\/git-upload-pack-command-not-found-how-to-fix-this-correctly\">http:\/\/stackoverflow.com\/questions\/225291\/git-upload-pack-command-not-found-how-to-fix-this-correctly<\/a><\/p>\n","protected":false},"excerpt":{"rendered":"<p>When doing a push to master I was getting bash: git-upload-pack: command not found bash: git-receive-pack: command not found For me my server was not recognizing the git command. I had to add the server paths to my local git config receivepack = \/home3\/&lt;myusername&gt;\/local\/git-1.6.4\/git-receive-pack uploadpack = \/home3\/&lt;myusername&gt;\/local\/git-1.6.4\/git-upload-pack where the config file is in the .git &hellip; <a href=\"https:\/\/n8williams.com\/devblog\/general_dev\/bash-git-receive-pack-command-not-found\" class=\"more-link\">Continue reading<span class=\"screen-reader-text\"> &#8220;bash: git-receive-pack: command not found, git-upload-pack&#8221;<\/span><\/a><\/p>\n","protected":false},"author":1,"featured_media":0,"comment_status":"open","ping_status":"open","sticky":false,"template":"","format":"standard","meta":[],"categories":[7],"tags":[],"yoast_head":"<!-- This site is optimized with the Yoast SEO plugin v20.11 - https:\/\/yoast.com\/wordpress\/plugins\/seo\/ -->\n<title>bash: git-receive-pack: command not found, git-upload-pack - The Dev Pages<\/title>\n<meta name=\"robots\" content=\"index, follow, max-snippet:-1, max-image-preview:large, max-video-preview:-1\" \/>\n<link rel=\"canonical\" href=\"https:\/\/n8williams.com\/devblog\/general_dev\/bash-git-receive-pack-command-not-found\" \/>\n<meta property=\"og:locale\" content=\"en_US\" \/>\n<meta property=\"og:type\" content=\"article\" \/>\n<meta property=\"og:title\" content=\"bash: git-receive-pack: command not found, git-upload-pack - The Dev Pages\" \/>\n<meta property=\"og:description\" content=\"When doing a push to master I was getting bash: git-upload-pack: command not found bash: git-receive-pack: command not found For me my server was not recognizing the git command. I had to add the server paths to my local git config receivepack = \/home3\/&lt;myusername&gt;\/local\/git-1.6.4\/git-receive-pack uploadpack = \/home3\/&lt;myusername&gt;\/local\/git-1.6.4\/git-upload-pack where the config file is in the .git &hellip; Continue reading &quot;bash: git-receive-pack: command not found, git-upload-pack&quot;\" \/>\n<meta property=\"og:url\" content=\"https:\/\/n8williams.com\/devblog\/general_dev\/bash-git-receive-pack-command-not-found\" \/>\n<meta property=\"og:site_name\" content=\"The Dev Pages\" \/>\n<meta property=\"article:published_time\" content=\"2009-08-30T22:21:59+00:00\" \/>\n<meta property=\"article:modified_time\" content=\"2009-09-02T06:14:02+00:00\" \/>\n<meta name=\"author\" content=\"Nate Admin\" \/>\n<meta name=\"twitter:card\" content=\"summary_large_image\" \/>\n<meta name=\"twitter:creator\" content=\"@admin\" \/>\n<meta name=\"twitter:site\" content=\"@admin\" \/>\n<meta name=\"twitter:label1\" content=\"Written by\" \/>\n\t<meta name=\"twitter:data1\" content=\"Nate Admin\" \/>\n\t<meta name=\"twitter:label2\" content=\"Est. reading time\" \/>\n\t<meta name=\"twitter:data2\" content=\"2 minutes\" \/>\n<script type=\"application\/ld+json\" class=\"yoast-schema-graph\">{\"@context\":\"https:\/\/schema.org\",\"@graph\":[{\"@type\":\"Article\",\"@id\":\"https:\/\/n8williams.com\/devblog\/general_dev\/bash-git-receive-pack-command-not-found#article\",\"isPartOf\":{\"@id\":\"https:\/\/n8williams.com\/devblog\/general_dev\/bash-git-receive-pack-command-not-found\"},\"author\":{\"name\":\"Nate Admin\",\"@id\":\"https:\/\/n8williams.com\/devblog\/#\/schema\/person\/1c31624786b5382f1a811f0a01985757\"},\"headline\":\"bash: git-receive-pack: command not found, git-upload-pack\",\"datePublished\":\"2009-08-30T22:21:59+00:00\",\"dateModified\":\"2009-09-02T06:14:02+00:00\",\"mainEntityOfPage\":{\"@id\":\"https:\/\/n8williams.com\/devblog\/general_dev\/bash-git-receive-pack-command-not-found\"},\"wordCount\":338,\"commentCount\":1,\"publisher\":{\"@id\":\"https:\/\/n8williams.com\/devblog\/#\/schema\/person\/1c31624786b5382f1a811f0a01985757\"},\"articleSection\":[\"General Dev\"],\"inLanguage\":\"en-US\",\"potentialAction\":[{\"@type\":\"CommentAction\",\"name\":\"Comment\",\"target\":[\"https:\/\/n8williams.com\/devblog\/general_dev\/bash-git-receive-pack-command-not-found#respond\"]}]},{\"@type\":\"WebPage\",\"@id\":\"https:\/\/n8williams.com\/devblog\/general_dev\/bash-git-receive-pack-command-not-found\",\"url\":\"https:\/\/n8williams.com\/devblog\/general_dev\/bash-git-receive-pack-command-not-found\",\"name\":\"bash: git-receive-pack: command not found, git-upload-pack - The Dev Pages\",\"isPartOf\":{\"@id\":\"https:\/\/n8williams.com\/devblog\/#website\"},\"datePublished\":\"2009-08-30T22:21:59+00:00\",\"dateModified\":\"2009-09-02T06:14:02+00:00\",\"breadcrumb\":{\"@id\":\"https:\/\/n8williams.com\/devblog\/general_dev\/bash-git-receive-pack-command-not-found#breadcrumb\"},\"inLanguage\":\"en-US\",\"potentialAction\":[{\"@type\":\"ReadAction\",\"target\":[\"https:\/\/n8williams.com\/devblog\/general_dev\/bash-git-receive-pack-command-not-found\"]}]},{\"@type\":\"BreadcrumbList\",\"@id\":\"https:\/\/n8williams.com\/devblog\/general_dev\/bash-git-receive-pack-command-not-found#breadcrumb\",\"itemListElement\":[{\"@type\":\"ListItem\",\"position\":1,\"name\":\"Home\",\"item\":\"https:\/\/n8williams.com\/devblog\/\"},{\"@type\":\"ListItem\",\"position\":2,\"name\":\"bash: git-receive-pack: command not found, git-upload-pack\"}]},{\"@type\":\"WebSite\",\"@id\":\"https:\/\/n8williams.com\/devblog\/#website\",\"url\":\"https:\/\/n8williams.com\/devblog\/\",\"name\":\"The Dev Pages\",\"description\":\"A knowledge base for web applications development (and beyond)\",\"publisher\":{\"@id\":\"https:\/\/n8williams.com\/devblog\/#\/schema\/person\/1c31624786b5382f1a811f0a01985757\"},\"potentialAction\":[{\"@type\":\"SearchAction\",\"target\":{\"@type\":\"EntryPoint\",\"urlTemplate\":\"https:\/\/n8williams.com\/devblog\/?s={search_term_string}\"},\"query-input\":\"required name=search_term_string\"}],\"inLanguage\":\"en-US\"},{\"@type\":[\"Person\",\"Organization\"],\"@id\":\"https:\/\/n8williams.com\/devblog\/#\/schema\/person\/1c31624786b5382f1a811f0a01985757\",\"name\":\"Nate Admin\",\"image\":{\"@type\":\"ImageObject\",\"inLanguage\":\"en-US\",\"@id\":\"https:\/\/n8williams.com\/devblog\/#\/schema\/person\/image\/\",\"url\":\"https:\/\/secure.gravatar.com\/avatar\/19d7bc7602072ac846e912622704a628?s=96&d=mm&r=g\",\"contentUrl\":\"https:\/\/secure.gravatar.com\/avatar\/19d7bc7602072ac846e912622704a628?s=96&d=mm&r=g\",\"caption\":\"Nate Admin\"},\"logo\":{\"@id\":\"https:\/\/n8williams.com\/devblog\/#\/schema\/person\/image\/\"},\"sameAs\":[\"http:\/\/n8williams.com\",\"https:\/\/twitter.com\/admin\"]}]}<\/script>\n<!-- \/ Yoast SEO plugin. -->","yoast_head_json":{"title":"bash: git-receive-pack: command not found, git-upload-pack - The Dev Pages","robots":{"index":"index","follow":"follow","max-snippet":"max-snippet:-1","max-image-preview":"max-image-preview:large","max-video-preview":"max-video-preview:-1"},"canonical":"https:\/\/n8williams.com\/devblog\/general_dev\/bash-git-receive-pack-command-not-found","og_locale":"en_US","og_type":"article","og_title":"bash: git-receive-pack: command not found, git-upload-pack - The Dev Pages","og_description":"When doing a push to master I was getting bash: git-upload-pack: command not found bash: git-receive-pack: command not found For me my server was not recognizing the git command. I had to add the server paths to my local git config receivepack = \/home3\/&lt;myusername&gt;\/local\/git-1.6.4\/git-receive-pack uploadpack = \/home3\/&lt;myusername&gt;\/local\/git-1.6.4\/git-upload-pack where the config file is in the .git &hellip; Continue reading \"bash: git-receive-pack: command not found, git-upload-pack\"","og_url":"https:\/\/n8williams.com\/devblog\/general_dev\/bash-git-receive-pack-command-not-found","og_site_name":"The Dev Pages","article_published_time":"2009-08-30T22:21:59+00:00","article_modified_time":"2009-09-02T06:14:02+00:00","author":"Nate Admin","twitter_card":"summary_large_image","twitter_creator":"@admin","twitter_site":"@admin","twitter_misc":{"Written by":"Nate Admin","Est. reading time":"2 minutes"},"schema":{"@context":"https:\/\/schema.org","@graph":[{"@type":"Article","@id":"https:\/\/n8williams.com\/devblog\/general_dev\/bash-git-receive-pack-command-not-found#article","isPartOf":{"@id":"https:\/\/n8williams.com\/devblog\/general_dev\/bash-git-receive-pack-command-not-found"},"author":{"name":"Nate Admin","@id":"https:\/\/n8williams.com\/devblog\/#\/schema\/person\/1c31624786b5382f1a811f0a01985757"},"headline":"bash: git-receive-pack: command not found, git-upload-pack","datePublished":"2009-08-30T22:21:59+00:00","dateModified":"2009-09-02T06:14:02+00:00","mainEntityOfPage":{"@id":"https:\/\/n8williams.com\/devblog\/general_dev\/bash-git-receive-pack-command-not-found"},"wordCount":338,"commentCount":1,"publisher":{"@id":"https:\/\/n8williams.com\/devblog\/#\/schema\/person\/1c31624786b5382f1a811f0a01985757"},"articleSection":["General Dev"],"inLanguage":"en-US","potentialAction":[{"@type":"CommentAction","name":"Comment","target":["https:\/\/n8williams.com\/devblog\/general_dev\/bash-git-receive-pack-command-not-found#respond"]}]},{"@type":"WebPage","@id":"https:\/\/n8williams.com\/devblog\/general_dev\/bash-git-receive-pack-command-not-found","url":"https:\/\/n8williams.com\/devblog\/general_dev\/bash-git-receive-pack-command-not-found","name":"bash: git-receive-pack: command not found, git-upload-pack - The Dev Pages","isPartOf":{"@id":"https:\/\/n8williams.com\/devblog\/#website"},"datePublished":"2009-08-30T22:21:59+00:00","dateModified":"2009-09-02T06:14:02+00:00","breadcrumb":{"@id":"https:\/\/n8williams.com\/devblog\/general_dev\/bash-git-receive-pack-command-not-found#breadcrumb"},"inLanguage":"en-US","potentialAction":[{"@type":"ReadAction","target":["https:\/\/n8williams.com\/devblog\/general_dev\/bash-git-receive-pack-command-not-found"]}]},{"@type":"BreadcrumbList","@id":"https:\/\/n8williams.com\/devblog\/general_dev\/bash-git-receive-pack-command-not-found#breadcrumb","itemListElement":[{"@type":"ListItem","position":1,"name":"Home","item":"https:\/\/n8williams.com\/devblog\/"},{"@type":"ListItem","position":2,"name":"bash: git-receive-pack: command not found, git-upload-pack"}]},{"@type":"WebSite","@id":"https:\/\/n8williams.com\/devblog\/#website","url":"https:\/\/n8williams.com\/devblog\/","name":"The Dev Pages","description":"A knowledge base for web applications development (and beyond)","publisher":{"@id":"https:\/\/n8williams.com\/devblog\/#\/schema\/person\/1c31624786b5382f1a811f0a01985757"},"potentialAction":[{"@type":"SearchAction","target":{"@type":"EntryPoint","urlTemplate":"https:\/\/n8williams.com\/devblog\/?s={search_term_string}"},"query-input":"required name=search_term_string"}],"inLanguage":"en-US"},{"@type":["Person","Organization"],"@id":"https:\/\/n8williams.com\/devblog\/#\/schema\/person\/1c31624786b5382f1a811f0a01985757","name":"Nate Admin","image":{"@type":"ImageObject","inLanguage":"en-US","@id":"https:\/\/n8williams.com\/devblog\/#\/schema\/person\/image\/","url":"https:\/\/secure.gravatar.com\/avatar\/19d7bc7602072ac846e912622704a628?s=96&d=mm&r=g","contentUrl":"https:\/\/secure.gravatar.com\/avatar\/19d7bc7602072ac846e912622704a628?s=96&d=mm&r=g","caption":"Nate Admin"},"logo":{"@id":"https:\/\/n8williams.com\/devblog\/#\/schema\/person\/image\/"},"sameAs":["http:\/\/n8williams.com","https:\/\/twitter.com\/admin"]}]}},"_links":{"self":[{"href":"https:\/\/n8williams.com\/devblog\/wp-json\/wp\/v2\/posts\/124"}],"collection":[{"href":"https:\/\/n8williams.com\/devblog\/wp-json\/wp\/v2\/posts"}],"about":[{"href":"https:\/\/n8williams.com\/devblog\/wp-json\/wp\/v2\/types\/post"}],"author":[{"embeddable":true,"href":"https:\/\/n8williams.com\/devblog\/wp-json\/wp\/v2\/users\/1"}],"replies":[{"embeddable":true,"href":"https:\/\/n8williams.com\/devblog\/wp-json\/wp\/v2\/comments?post=124"}],"version-history":[{"count":10,"href":"https:\/\/n8williams.com\/devblog\/wp-json\/wp\/v2\/posts\/124\/revisions"}],"predecessor-version":[{"id":127,"href":"https:\/\/n8williams.com\/devblog\/wp-json\/wp\/v2\/posts\/124\/revisions\/127"}],"wp:attachment":[{"href":"https:\/\/n8williams.com\/devblog\/wp-json\/wp\/v2\/media?parent=124"}],"wp:term":[{"taxonomy":"category","embeddable":true,"href":"https:\/\/n8williams.com\/devblog\/wp-json\/wp\/v2\/categories?post=124"},{"taxonomy":"post_tag","embeddable":true,"href":"https:\/\/n8williams.com\/devblog\/wp-json\/wp\/v2\/tags?post=124"}],"curies":[{"name":"wp","href":"https:\/\/api.w.org\/{rel}","templated":true}]}}