djangofan
djangofan

Reputation: 29689

How do I get my Play 2.1 app started on Heroku

I am trying to start a Play 2.1 app on Heroku but I don't know how to get it started on one dyno. I am trying to deploy the 'demo' app from "SecureSocial" to Heroku. I used the IntelliJ-IDEA Heroku plugin to upload my project to Heroku. I am using the suggested "Procfile" but I do not know how to get Heroku to start up a dyno. It is acting like it wont start and I don't know how to resolve it.

My Procfile (in the root of my project) contains:

web: target/start -Dhttp.port=$PORT -DapplyEvolutions.default=true -Ddb.default.driver=
  org.postgresql.Driver -Ddb.default.url=$DATABASE_URL

Perhaps I haven't actually uploaded my code to Heroku, but I just think I have? How can I tell? Heroku doesn't seem to allow me to browse the code.

My IntelliJ-IDEA Heroku plugin was able to create the Heroku online project and so I see no reason why it shouldn't have pushed code to "heroku master" for me. One problem I have right now is that the command line git push fails:

C:\IntelliJ IDEA 12.1.4\workspace\signup-sheet>git remote -v
heroku  [email protected]:signup-sheet.git (fetch)
heroku  [email protected]:signup-sheet.git (push)
origin  https://github.com/djangofan/signup-sheet.git (fetch)
origin  https://github.com/djangofan/signup-sheet.git (push)

C:\IntelliJ IDEA 12.1.4\workspace\signup-sheet>heroku login
Enter your Heroku credentials.
Email: [email protected]
Password (typing will be hidden):
Authentication successful.

C:\IntelliJ IDEA 12.1.4\workspace\signup-sheet>heroku create
Creating nameless-depths-2834... done, stack is cedar
http://nameless-depths-2834.herokuapp.com/ | [email protected]:nameless-depths-2834.git

C:\IntelliJ IDEA 12.1.4\workspace\signup-sheet>git push heroku master
Permission denied (publickey).
fatal: Could not read from remote repository.

Please make sure you have the correct access rights
and the repository exists.
C:\IntelliJ IDEA 12.1.4\workspace\signup-sheet>heroku releases
=== signup-sheet Releases
v2  Enable Logplex   [email protected]  2013/06/12 21:37:43 (~ 10h ago)
v1  Initial release  [email protected]  2013/06/12 21:37:42 (~ 10h ago)

Upvotes: 1

Views: 371

Answers (2)

practicalli-johnny
practicalli-johnny

Reputation: 1916

Whilst you can create Heroku applications with only an Heroku account, you cannot deploy any code until you have a public key added to Heroku. You can tell if you have a key added using the Heroku toolbelt ( http://toolbelt.heroku.com/ ) and the following command:

heroku keys

If you have multiple keys listed, or do not know which key is the right one, you can clear all keys and add the key you know is correct. If you only have one key, then you dont need to specify it.

heroku keys:clear
heroku keys:add /path/to/public/key/for/heroku.pub

If your key is called something other than id_rsa.pub then you may need to create an SSH config file to define which key should be used for Heroku

Host heroku.com
Hostname heroku.com
Port 22
IdentitiesOnly yes
IdentityFile ~/.ssh/heroku  # or what ever you called the public key
TCPKeepAlive yes
user [email protected]  # include the email address used for your heroku account

You should now be able to push your code to Heroku and therefore create a "Deploy" release, eg:

V6 Deploy 53u883u

Thanks

Upvotes: 1

Pere Villega
Pere Villega

Reputation: 16439

By this lines

Permission denied (publickey).
fatal: Could not read from remote repository.

it seems to be an issue with the Public key associated to your Heroku git repository. This question has the answer you seek.

Upvotes: 1

Related Questions