heroku / heroku-eclipse-plugin

Warning: Deprecated! Heroku Eclipse plugin is a fully integrated plugin into Eclipse IDE that will allow developers to manage their Heroku apps and environment right from their favourite IDE
1 stars 0 forks source link

Wrong error message if ssh key is not authorized #36

Closed jesperfj closed 12 years ago

jesperfj commented 12 years ago

If I have correct login credentials but a bad ssh key, then I am able to go through the import wizard up until the point when I click finish and the import starts. Then I get an error dialog with the message "invalid remote: origin".

Looking at .metadata/.log:

org.eclipse.jgit.api.errors.JGitInternalException: Invalid remote: origin
    at org.eclipse.jgit.api.CloneCommand.call(CloneCommand.java:128)
    at org.eclipse.egit.core.op.CloneOperation.run(CloneOperation.java:153)
    at com.heroku.eclipse.core.services.rest.RestHerokuServices.executeCloneOperation(RestHerokuServices.java:469)
    at com.heroku.eclipse.core.services.rest.RestHerokuServices.access$0(RestHerokuServices.java:468)
    at com.heroku.eclipse.core.services.rest.RestHerokuServices$2.run(RestHerokuServices.java:445)
    at org.eclipse.core.internal.jobs.Worker.run(Worker.java:54)
Caused by: org.eclipse.jgit.api.errors.InvalidRemoteException: Invalid remote: origin
    at org.eclipse.jgit.api.FetchCommand.call(FetchCommand.java:135)
    at org.eclipse.jgit.api.CloneCommand.fetch(CloneCommand.java:175)
    at org.eclipse.jgit.api.CloneCommand.call(CloneCommand.java:121)
    ... 5 more
Caused by: org.eclipse.jgit.errors.NoRemoteRepositoryException: git@heroku.com:cold-mist-9190.git: 
 !  Your key with fingerprint 04:f2:90:d4:ce:75:60:5e:fd:5f:9d:ae:ab:ec:d4:13 is not authorized to access cold-mist-9190.

    at org.eclipse.jgit.transport.TransportGitSsh.cleanNotFound(TransportGitSsh.java:194)
    at org.eclipse.jgit.transport.TransportGitSsh$SshFetchConnection.<init>(TransportGitSsh.java:274)
    at org.eclipse.jgit.transport.TransportGitSsh.openFetch(TransportGitSsh.java:147)
    at org.eclipse.jgit.transport.FetchProcess.executeImp(FetchProcess.java:127)
    at org.eclipse.jgit.transport.FetchProcess.execute(FetchProcess.java:113)
    at org.eclipse.jgit.transport.Transport.fetch(Transport.java:1062)
    at org.eclipse.jgit.api.FetchCommand.call(FetchCommand.java:129)
    ... 7 more

I can see that my ssh key is bad. The error message should be fixed to tell me it's the ssh key that's the problem.

daudo commented 12 years ago

Did you specify the failing SSH key in the Heroku Preferences?

jesperfj commented 12 years ago

No. The preferences had the wrong ssh key.

On Jul 3, 2012, at 7:32 AM, daudo reply@reply.github.com wrote:

Did you specify the failing SSH key in the Heroku Preferences?


Reply to this email directly or view it on GitHub: https://github.com/heroku/heroku-eclipse-plugin/issues/36#issuecomment-6735896

anandbn commented 12 years ago

Error message when an exception happens as part of the "git clone" should be:

We have encountered a problem creating your application:<app_name>. This could be due to the Eclipse SSH key is not matching the SSH key(s) that is associated with your Heroku account. To fix this error, you can:

- Associate your SSH key to your Heroku account by going to "Preferences" OR
- If the SSH Key is correct, restart Eclipse.