{"id":6634,"date":"2014-04-20T13:58:20","date_gmt":"2014-04-20T13:58:20","guid":{"rendered":"https:\/\/unknownerror.org\/index.php\/2014\/04\/20\/correct-git-clone-syntax-for-ssh-collection-of-common-programming-errors\/"},"modified":"2014-04-20T13:58:20","modified_gmt":"2014-04-20T13:58:20","slug":"correct-git-clone-syntax-for-ssh-collection-of-common-programming-errors","status":"publish","type":"post","link":"https:\/\/unknownerror.org\/index.php\/2014\/04\/20\/correct-git-clone-syntax-for-ssh-collection-of-common-programming-errors\/","title":{"rendered":"Correct Git clone syntax for SSH-Collection of common programming errors"},"content":{"rendered":"<p>The problem for me was write access to the directory and I fixed it using &#8220;sudo&#8221;. I had to create an alias in my bash profile that shorthanded the sudo command before the git command.<\/p>\n<p>Below is the line I added to my .profile file and it works great. I no longer have the &#8220;fatal: could not create work tree dir&#8230;&#8221; message anymore.<\/p>\n<pre><code>alias sgit=\"sudo \/usr\/local\/git\/bin\/git\"\n<\/code><\/pre>\n<p><strong>UPDATE<\/strong><\/p>\n<p>I spoke too soon. Doing this caused other issues with programs on my Mac to save files in the directory since the directory was owned by root. I had to change the root directory to my user account (which is also admin). This in turn made my alias to &#8220;sudo git&#8221; useless since I can now just use git without sudo. Hope this helps someone.<\/p>\n","protected":false},"excerpt":{"rendered":"<p>The problem for me was write access to the directory and I fixed it using &#8220;sudo&#8221;. I had to create an alias in my bash profile that shorthanded the sudo command before the git command. Below is the line I added to my .profile file and it works great. I no longer have the &#8220;fatal: [&hellip;]<\/p>\n","protected":false},"author":1,"featured_media":0,"comment_status":"closed","ping_status":"closed","sticky":false,"template":"","format":"standard","meta":{"footnotes":""},"categories":[1],"tags":[],"class_list":["post-6634","post","type-post","status-publish","format-standard","hentry","category-uncategorized"],"_links":{"self":[{"href":"https:\/\/unknownerror.org\/index.php\/wp-json\/wp\/v2\/posts\/6634","targetHints":{"allow":["GET"]}}],"collection":[{"href":"https:\/\/unknownerror.org\/index.php\/wp-json\/wp\/v2\/posts"}],"about":[{"href":"https:\/\/unknownerror.org\/index.php\/wp-json\/wp\/v2\/types\/post"}],"author":[{"embeddable":true,"href":"https:\/\/unknownerror.org\/index.php\/wp-json\/wp\/v2\/users\/1"}],"replies":[{"embeddable":true,"href":"https:\/\/unknownerror.org\/index.php\/wp-json\/wp\/v2\/comments?post=6634"}],"version-history":[{"count":0,"href":"https:\/\/unknownerror.org\/index.php\/wp-json\/wp\/v2\/posts\/6634\/revisions"}],"wp:attachment":[{"href":"https:\/\/unknownerror.org\/index.php\/wp-json\/wp\/v2\/media?parent=6634"}],"wp:term":[{"taxonomy":"category","embeddable":true,"href":"https:\/\/unknownerror.org\/index.php\/wp-json\/wp\/v2\/categories?post=6634"},{"taxonomy":"post_tag","embeddable":true,"href":"https:\/\/unknownerror.org\/index.php\/wp-json\/wp\/v2\/tags?post=6634"}],"curies":[{"name":"wp","href":"https:\/\/api.w.org\/{rel}","templated":true}]}}