免責聲明

Disclaimer (免責聲明)
繼續閱覽代表您接受以上的免責聲明.
To continue reading means you accept the above disclaimer.

2015年1月27日 星期二

codio to heroku, RPC failed error,

//=== http://forum.codio.com/t/deploying-app-to-heroku/1589/3
deploy app from codio.com to heroku.com

* first install heroku commandline client for codio
$ parts install heroku-cli


$ cd myApp

* git init if necessary
...


$ heroku login
Enter your Heroku credentials.
Email: .......
Password (typing will be hidden):
Authentication successful.


$ heroku apps
...

* delete an app (e.g. 'oldApp') if 5 apps already exist
$ heroku apps:destroy oldApp
...

* create new app repo on Heroku for myApp
$ heroku apps:create heroku-myApp [default http-git]
[$ heroku create heroku-myApp --ssh-git]
...


* default http-git
$ git remote -v
// $ heroku git:remote --http-git
heroku https://git.heroku.com/heroku-myApp.git (fetch)
heroku https://git.heroku.com/heroku-myApp.git (push)
origin ....git (fetch)
origin ....git (push)



* ssh-git
$ heroku git:remote --ssh-git
$ git remote -v
heroku git@heroku.com:heroku-myApp.git (fetch)
heroku git@heroku.com:heroku-myApp.git (push)
origin ....git (fetch)
origin ....git (push)



* add SSH key for ssh-git
$ heroku keys: add

$ git push heroku master
[$ git push -u origin master] ?


//=== git config
$ git config -l
$ git config --global -l
$ git config --local -l




//=== if myApp is cloned from another git "partially" [ --depth n , shallow clone ]
error: RPC failed; result=22, HTTP code = 400 ...
fatal: The remote end hung up unexpectedly ...

--> git config http.postBuffer 52428800?
--> try ssh-git got the more relevant error msg

RSA key fingerprint is ...
Are you sure you want to continue connecting (yes/no)? yes
Warning: Permanently added 'heroku.com,50.19.85.132' (RSA) to ...
Initializing repository, done.
Counting objects: 450, done.
Compressing objects: 100% (221/221), done.

*** fatal: protocol error: expected old/new/ref, got 'shallow d18c6 ...

error: pack-objects died of signal 13
error: failed to push some refs to 'git@heroku.com:heroku...



--> git fetch --unshallow

https://github.com/travis-ci/dpl/issues/127
""" ...
Travis' shallow clone can fail heroku deploys using `git` strategy #127
...

... Git 1.9, which added pushing-shallow-clone to the git protocol. Heroku's Git version does not understand this.
... workaround would be to run git fetch --unshallow before the deploy.

... """

沒有留言:

張貼留言