{"id":235,"date":"2011-11-07T02:19:58","date_gmt":"2011-11-07T08:19:58","guid":{"rendered":"http:\/\/www.n8williams.com\/devblog\/?p=235"},"modified":"2011-11-07T02:19:58","modified_gmt":"2011-11-07T08:19:58","slug":"git-permissions-error-unable-to-create-temporary-sha1-filename-objects19-file-exists","status":"publish","type":"post","link":"https:\/\/n8williams.com\/devblog\/git\/git-permissions-error-unable-to-create-temporary-sha1-filename-objects19-file-exists","title":{"rendered":"git permissions error: unable to create temporary sha1 filename .\/objects\/19: File exists"},"content":{"rendered":"<p>I had done a git rm of some swp files (I had forgotten to put *.swp in my .gitignore for this project) and after committing, I pushed to the remote origin and was suprised to see:<\/p>\n<p>error: unable to create temporary sha1 filename .\/objects\/19: File exists<\/p>\n<p>If you get this error (Where 19 is a number unique to your situation), then it is probably a permissions issue. On the remote server, make sure the remote bare repos, and ALL subfolders and files are owned by the appropriate (usually git) user. What is annoying is that somehow in the course of pretty normal git tasks, a non-git user was assigned ownership, or the git user was denied rights somehow. I forgot to check what the bad permissions were before I chowned and chgrped the files.<\/p>\n<p>Once I logged in as an admin, changed to the git user\u2019s home directory where all the remote bare repos exist, and issued \u2019sudo chown -R git .\/\u2019 and \u2019sudo chgrp -R git .\/\u2019 all was well.<\/p>\n<p>I think the way to avoid this error is to make sure you are using the git user if you are pushing changes on the same server as the remote git repos.<\/p>\n<p>See a more in depth discussion at <a target=\"_blank\" href=\"http:\/\/kerneltrap.org\/mailarchive\/git\/2008\/11\/28\/4258264\/thread\">http:\/\/kerneltrap.org\/mailarchive\/git\/2008\/11\/28\/4258264\/thread<\/a><\/p>\n","protected":false},"excerpt":{"rendered":"<p>I had done a git rm of some swp files (I had forgotten to put *.swp in my .gitignore for this project) and after committing, I pushed to the remote origin and was suprised to see: error: unable to create temporary sha1 filename .\/objects\/19: File exists If you get this error (Where 19 is a &hellip; <a href=\"https:\/\/n8williams.com\/devblog\/git\/git-permissions-error-unable-to-create-temporary-sha1-filename-objects19-file-exists\" class=\"more-link\">Continue reading<span class=\"screen-reader-text\"> &#8220;git permissions error: unable to create temporary sha1 filename .\/objects\/19: File exists&#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":[12],"tags":[],"yoast_head":"<!-- This site is optimized with the Yoast SEO plugin v20.11 - https:\/\/yoast.com\/wordpress\/plugins\/seo\/ -->\n<title>git permissions error: unable to create temporary sha1 filename .\/objects\/19: File exists - 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\/git\/git-permissions-error-unable-to-create-temporary-sha1-filename-objects19-file-exists\" \/>\n<meta property=\"og:locale\" content=\"en_US\" \/>\n<meta property=\"og:type\" content=\"article\" \/>\n<meta property=\"og:title\" content=\"git permissions error: unable to create temporary sha1 filename .\/objects\/19: File exists - The Dev Pages\" \/>\n<meta property=\"og:description\" content=\"I had done a git rm of some swp files (I had forgotten to put *.swp in my .gitignore for this project) and after committing, I pushed to the remote origin and was suprised to see: error: unable to create temporary sha1 filename .\/objects\/19: File exists If you get this error (Where 19 is a &hellip; Continue reading &quot;git permissions error: unable to create temporary sha1 filename .\/objects\/19: File exists&quot;\" \/>\n<meta property=\"og:url\" content=\"https:\/\/n8williams.com\/devblog\/git\/git-permissions-error-unable-to-create-temporary-sha1-filename-objects19-file-exists\" \/>\n<meta property=\"og:site_name\" content=\"The Dev Pages\" \/>\n<meta property=\"article:published_time\" content=\"2011-11-07T08:19:58+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=\"1 minute\" \/>\n<script type=\"application\/ld+json\" class=\"yoast-schema-graph\">{\"@context\":\"https:\/\/schema.org\",\"@graph\":[{\"@type\":\"Article\",\"@id\":\"https:\/\/n8williams.com\/devblog\/git\/git-permissions-error-unable-to-create-temporary-sha1-filename-objects19-file-exists#article\",\"isPartOf\":{\"@id\":\"https:\/\/n8williams.com\/devblog\/git\/git-permissions-error-unable-to-create-temporary-sha1-filename-objects19-file-exists\"},\"author\":{\"name\":\"Nate Admin\",\"@id\":\"https:\/\/n8williams.com\/devblog\/#\/schema\/person\/1c31624786b5382f1a811f0a01985757\"},\"headline\":\"git permissions error: unable to create temporary sha1 filename .\/objects\/19: File exists\",\"datePublished\":\"2011-11-07T08:19:58+00:00\",\"dateModified\":\"2011-11-07T08:19:58+00:00\",\"mainEntityOfPage\":{\"@id\":\"https:\/\/n8williams.com\/devblog\/git\/git-permissions-error-unable-to-create-temporary-sha1-filename-objects19-file-exists\"},\"wordCount\":226,\"commentCount\":0,\"publisher\":{\"@id\":\"https:\/\/n8williams.com\/devblog\/#\/schema\/person\/1c31624786b5382f1a811f0a01985757\"},\"articleSection\":[\"Git\"],\"inLanguage\":\"en-US\",\"potentialAction\":[{\"@type\":\"CommentAction\",\"name\":\"Comment\",\"target\":[\"https:\/\/n8williams.com\/devblog\/git\/git-permissions-error-unable-to-create-temporary-sha1-filename-objects19-file-exists#respond\"]}]},{\"@type\":\"WebPage\",\"@id\":\"https:\/\/n8williams.com\/devblog\/git\/git-permissions-error-unable-to-create-temporary-sha1-filename-objects19-file-exists\",\"url\":\"https:\/\/n8williams.com\/devblog\/git\/git-permissions-error-unable-to-create-temporary-sha1-filename-objects19-file-exists\",\"name\":\"git permissions error: unable to create temporary sha1 filename .\/objects\/19: File exists - The Dev Pages\",\"isPartOf\":{\"@id\":\"https:\/\/n8williams.com\/devblog\/#website\"},\"datePublished\":\"2011-11-07T08:19:58+00:00\",\"dateModified\":\"2011-11-07T08:19:58+00:00\",\"breadcrumb\":{\"@id\":\"https:\/\/n8williams.com\/devblog\/git\/git-permissions-error-unable-to-create-temporary-sha1-filename-objects19-file-exists#breadcrumb\"},\"inLanguage\":\"en-US\",\"potentialAction\":[{\"@type\":\"ReadAction\",\"target\":[\"https:\/\/n8williams.com\/devblog\/git\/git-permissions-error-unable-to-create-temporary-sha1-filename-objects19-file-exists\"]}]},{\"@type\":\"BreadcrumbList\",\"@id\":\"https:\/\/n8williams.com\/devblog\/git\/git-permissions-error-unable-to-create-temporary-sha1-filename-objects19-file-exists#breadcrumb\",\"itemListElement\":[{\"@type\":\"ListItem\",\"position\":1,\"name\":\"Home\",\"item\":\"https:\/\/n8williams.com\/devblog\/\"},{\"@type\":\"ListItem\",\"position\":2,\"name\":\"git permissions error: unable to create temporary sha1 filename .\/objects\/19: File exists\"}]},{\"@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":"git permissions error: unable to create temporary sha1 filename .\/objects\/19: File exists - 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\/git\/git-permissions-error-unable-to-create-temporary-sha1-filename-objects19-file-exists","og_locale":"en_US","og_type":"article","og_title":"git permissions error: unable to create temporary sha1 filename .\/objects\/19: File exists - The Dev Pages","og_description":"I had done a git rm of some swp files (I had forgotten to put *.swp in my .gitignore for this project) and after committing, I pushed to the remote origin and was suprised to see: error: unable to create temporary sha1 filename .\/objects\/19: File exists If you get this error (Where 19 is a &hellip; Continue reading \"git permissions error: unable to create temporary sha1 filename .\/objects\/19: File exists\"","og_url":"https:\/\/n8williams.com\/devblog\/git\/git-permissions-error-unable-to-create-temporary-sha1-filename-objects19-file-exists","og_site_name":"The Dev Pages","article_published_time":"2011-11-07T08:19:58+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":"1 minute"},"schema":{"@context":"https:\/\/schema.org","@graph":[{"@type":"Article","@id":"https:\/\/n8williams.com\/devblog\/git\/git-permissions-error-unable-to-create-temporary-sha1-filename-objects19-file-exists#article","isPartOf":{"@id":"https:\/\/n8williams.com\/devblog\/git\/git-permissions-error-unable-to-create-temporary-sha1-filename-objects19-file-exists"},"author":{"name":"Nate Admin","@id":"https:\/\/n8williams.com\/devblog\/#\/schema\/person\/1c31624786b5382f1a811f0a01985757"},"headline":"git permissions error: unable to create temporary sha1 filename .\/objects\/19: File exists","datePublished":"2011-11-07T08:19:58+00:00","dateModified":"2011-11-07T08:19:58+00:00","mainEntityOfPage":{"@id":"https:\/\/n8williams.com\/devblog\/git\/git-permissions-error-unable-to-create-temporary-sha1-filename-objects19-file-exists"},"wordCount":226,"commentCount":0,"publisher":{"@id":"https:\/\/n8williams.com\/devblog\/#\/schema\/person\/1c31624786b5382f1a811f0a01985757"},"articleSection":["Git"],"inLanguage":"en-US","potentialAction":[{"@type":"CommentAction","name":"Comment","target":["https:\/\/n8williams.com\/devblog\/git\/git-permissions-error-unable-to-create-temporary-sha1-filename-objects19-file-exists#respond"]}]},{"@type":"WebPage","@id":"https:\/\/n8williams.com\/devblog\/git\/git-permissions-error-unable-to-create-temporary-sha1-filename-objects19-file-exists","url":"https:\/\/n8williams.com\/devblog\/git\/git-permissions-error-unable-to-create-temporary-sha1-filename-objects19-file-exists","name":"git permissions error: unable to create temporary sha1 filename .\/objects\/19: File exists - The Dev Pages","isPartOf":{"@id":"https:\/\/n8williams.com\/devblog\/#website"},"datePublished":"2011-11-07T08:19:58+00:00","dateModified":"2011-11-07T08:19:58+00:00","breadcrumb":{"@id":"https:\/\/n8williams.com\/devblog\/git\/git-permissions-error-unable-to-create-temporary-sha1-filename-objects19-file-exists#breadcrumb"},"inLanguage":"en-US","potentialAction":[{"@type":"ReadAction","target":["https:\/\/n8williams.com\/devblog\/git\/git-permissions-error-unable-to-create-temporary-sha1-filename-objects19-file-exists"]}]},{"@type":"BreadcrumbList","@id":"https:\/\/n8williams.com\/devblog\/git\/git-permissions-error-unable-to-create-temporary-sha1-filename-objects19-file-exists#breadcrumb","itemListElement":[{"@type":"ListItem","position":1,"name":"Home","item":"https:\/\/n8williams.com\/devblog\/"},{"@type":"ListItem","position":2,"name":"git permissions error: unable to create temporary sha1 filename .\/objects\/19: File exists"}]},{"@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\/235"}],"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=235"}],"version-history":[{"count":1,"href":"https:\/\/n8williams.com\/devblog\/wp-json\/wp\/v2\/posts\/235\/revisions"}],"predecessor-version":[{"id":236,"href":"https:\/\/n8williams.com\/devblog\/wp-json\/wp\/v2\/posts\/235\/revisions\/236"}],"wp:attachment":[{"href":"https:\/\/n8williams.com\/devblog\/wp-json\/wp\/v2\/media?parent=235"}],"wp:term":[{"taxonomy":"category","embeddable":true,"href":"https:\/\/n8williams.com\/devblog\/wp-json\/wp\/v2\/categories?post=235"},{"taxonomy":"post_tag","embeddable":true,"href":"https:\/\/n8williams.com\/devblog\/wp-json\/wp\/v2\/tags?post=235"}],"curies":[{"name":"wp","href":"https:\/\/api.w.org\/{rel}","templated":true}]}}