{"id":1981,"date":"2015-01-26T10:16:48","date_gmt":"2015-01-26T16:16:48","guid":{"rendered":"http:\/\/www.mooreds.com\/wordpress\/?p=1981"},"modified":"2015-01-18T10:26:14","modified_gmt":"2015-01-18T16:26:14","slug":"400-error-on-heroku-gitclone","status":"publish","type":"post","link":"https:\/\/www.mooreds.com\/wordpress\/archives\/1981","title":{"rendered":"400 error on heroku git:clone"},"content":{"rendered":"<figure style=\"width: 150px\" class=\"wp-caption alignright\"><img loading=\"lazy\" decoding=\"async\" title=\"Heroku Pancake by jacobian\" src=\"http:\/\/www.mooreds.com\/wordpress\/wp-content\/uploads\/2015\/01\/9908627255_8763e1f4e1_q_heroku.jpg\" alt=\"heroku photo\" width=\"150\" height=\"150\" \/><figcaption class=\"wp-caption-text\"><small>Photo by <a href=\"http:\/\/www.flickr.com\/photos\/81931330@N00\/9908627255\" target=\"_blank\">jacobian<\/a> <a title=\"Attribution License\" href=\"http:\/\/creativecommons.org\/licenses\/by\/2.0\/\" target=\"_blank\" rel=\"nofollow\"><img decoding=\"async\" src=\"http:\/\/www.mooreds.com\/wordpress\/wp-content\/plugins\/wp-inject\/images\/cc.png\" alt=\"\" \/><\/a><\/small><\/figcaption><\/figure>\n<p>I&#8217;m working on an estimate for changes to a heroku hosted web application.<\/p>\n<p>I was trying to run <code> heroku git:clone --app appname<\/code> after adding myself as a collaborator. I was running this on a new vagrant box running ubuntu.<\/p>\n<p>However, I kept getting this error message:<\/p>\n<p><code>vagrant@precise64:~$ heroku git:clone --app appname<br \/>\nCloning from app 'appname'...<br \/>\nCloning into 'appname'...<br \/>\nerror: The requested URL returned error: 400 while accessing https:\/\/git.heroku.com\/appname.git\/info\/refs<br \/>\nfatal: HTTP request failed<\/code><\/p>\n<p>And I couldn&#8217;t understand why.<\/p>\n<p>After some fiddling, I determined that first you need to have an ssh key generated:<\/p>\n<p><code>vagrant@precise64:~$ ssh-keygen -t rsa<\/code><\/p>\n<p>And then you can run:<\/p>\n<p><code>vagrant@precise64:~$ heroku git:clone --app appname --ssh-git<br \/>\nCloning from app 'appname'...<br \/>\nCloning into 'appname'...<br \/>\nWarning: Permanently added the RSA host key for IP address 'ipaddress' to the list of known hosts.<br \/>\nFetching repository, done.<br \/>\nremote: Counting objects: 902, done.<br \/>\nremote: Compressing objects: 100% (473\/473), done.<br \/>\nremote: Total 902 (delta 433), reused 826 (delta 379)<br \/>\nReceiving objects: 100% (902\/902), 28.06 MiB | 556 KiB\/s, done.<br \/>\nResolving deltas: 100% (433\/433), done.<\/code><\/p>\n<p>Hope this helps someone, somewhere.<\/p>\n","protected":false},"excerpt":{"rendered":"<p>I&#8217;m working on an estimate for changes to a heroku hosted web application. I was trying to run heroku git:clone &#8211;app appname after adding myself as a collaborator. I was [&hellip;]<\/p>\n","protected":false},"author":2,"featured_media":0,"comment_status":"closed","ping_status":"open","sticky":false,"template":"","format":"standard","meta":{"footnotes":""},"categories":[10,20],"tags":[],"class_list":["post-1981","post","type-post","status-publish","format-standard","hentry","category-dynamic-languages","category-web-applications"],"_links":{"self":[{"href":"https:\/\/www.mooreds.com\/wordpress\/wp-json\/wp\/v2\/posts\/1981","targetHints":{"allow":["GET"]}}],"collection":[{"href":"https:\/\/www.mooreds.com\/wordpress\/wp-json\/wp\/v2\/posts"}],"about":[{"href":"https:\/\/www.mooreds.com\/wordpress\/wp-json\/wp\/v2\/types\/post"}],"author":[{"embeddable":true,"href":"https:\/\/www.mooreds.com\/wordpress\/wp-json\/wp\/v2\/users\/2"}],"replies":[{"embeddable":true,"href":"https:\/\/www.mooreds.com\/wordpress\/wp-json\/wp\/v2\/comments?post=1981"}],"version-history":[{"count":4,"href":"https:\/\/www.mooreds.com\/wordpress\/wp-json\/wp\/v2\/posts\/1981\/revisions"}],"predecessor-version":[{"id":1988,"href":"https:\/\/www.mooreds.com\/wordpress\/wp-json\/wp\/v2\/posts\/1981\/revisions\/1988"}],"wp:attachment":[{"href":"https:\/\/www.mooreds.com\/wordpress\/wp-json\/wp\/v2\/media?parent=1981"}],"wp:term":[{"taxonomy":"category","embeddable":true,"href":"https:\/\/www.mooreds.com\/wordpress\/wp-json\/wp\/v2\/categories?post=1981"},{"taxonomy":"post_tag","embeddable":true,"href":"https:\/\/www.mooreds.com\/wordpress\/wp-json\/wp\/v2\/tags?post=1981"}],"curies":[{"name":"wp","href":"https:\/\/api.w.org\/{rel}","templated":true}]}}