0

I'm trying to follow Hartl's tutorial. At the end of first chapter, he has us deploying to Heroku's site. I tried doing that, and it didn't work.

This was four days ago. I'm trying again ... and noticed that when I do "git push heroku master" I get this:

ssh: connect to host heroky.com port 22: Connection refused
fatal: The remote end hung up unexpectedly

Notice it says heroky.com? Should it be that?

When I did "git config --list," among other things it states:

remote.heroku.url=git@heroky.com:{first_app}.git

I'm really new to all this, so any advice to fix this would be really really appreciated.

Edit:

based on a comment below, I've edited .git/config file and reset heroky to heroku.

But now, I'm getting:

Warning: Permanently added the RSA host key for IP address 'xx.xx.xx.xxx'(not really x's) to the list of known       hosts.
Permission denied (publickey).
fatal: The remote end hung up unexpectedly

What does this mean?

Edit 2:

Never mind about permission being denied. I had apparently entered wrong password. Now I have a new problem which has me stumped.

When I try "git push heroku master" again, this is what I get:

!  No such app as first_app.

fatal: The remote end hung up unexpectedly

Why????

This is my config file:

[core]
repositoryformatversion = 0
filemode = true
bare = false
logallrefupdates = true
ignorecase = true
[remote "origin"]
url = https://github.com/name_removed/first_app.git
fetch = +refs/heads/*:refs/remotes/origin/*
[branch "master"]
remote = origin
merge = refs/heads/master
[remote "heroku"]
url = git@heroku.com:first_app.git
fetch = +refs/heads/*:refs/remotes/heroku/*

Edit 3

Turns out that the problem was in this line: url = git@heroku.com:first_app.git

Changed first_app.git to Heroku's app url. Then it worked!

Thanks all. Not sure how to give credit or so on ... since it was elithrar's comment that first started the ball rolling in trouble-shooting the whole thing. It didn't solve it, but it got me somewhere. How does one deal points,credit, etc, here? Or should I also give credit to jli since he answered in an answer format? (yes, i overthink these things).

Edit 4

Actually, I have one more question ... why did I have to edit my config file to change first_app.git line? Shouldn't that have been automatic? I'm confused how the whole thing was handled.

  • Is it just me or does heroky.com seem weird, should be heroku ? – house9 Aug 13 '12 at 02:17
  • Did you actually try **going** to http://heroky.com?? **Of course** it shouldn't be that. – user229044 Aug 13 '12 at 02:25
  • Obviously it should be heroku. =) didn't know how to fix it till the comment beneath telling me to fix via .git/config. Now I have a new problem. Any advice? –  Aug 13 '12 at 02:43

2 Answers2

2

You have your remote host set to heroky rather than heroku. Just change it to heroku and it'll work.

jli
  • 6,523
  • 2
  • 29
  • 37
  • 1
    To expand on this - edit the `.git/config` file in your project directory and correct the `heroky` typo. – elithrar Aug 13 '12 at 02:28
  • how? i checked the first app directory for .git/config and can't find the file ... where is it? –  Aug 13 '12 at 02:33
  • never mind. found it. did "git push heroku master" again ... now, it's saying: "Warning: Permanently added the RSA host key for IP address 'xx.xx.xx.xxx' to the list of known hosts. Permission denied (publickey). fatal: The remote end hung up unexpectedly" –  Aug 13 '12 at 02:36
  • @jli I do have the keys. That shouldn't be the issue,I think. If I do "heroku keys:add", it comes up with "Found existing public key: " and "Uploading SSH public key" –  Aug 13 '12 at 02:45
0

Are you behind a proxy? You might have to modify your .ssh/config to look something like this:

Host git_heroku
  Hostname heroku.com
  User git
  ProxyCommand {"proxy config info specific to you
  Port 443

And in your .git/config change

git@heroku.com

to

git_heroku

Referencing this SO thread might help you too:

Error in git push heroku master through ssh behind proxy

Community
  • 1
  • 1
dougiebuckets
  • 2,383
  • 3
  • 27
  • 37
  • no, i'm not behind any proxy. i remember checking for that four days ago. anyway, side question - my .ssh file is empty. that is normal, right? –  Aug 13 '12 at 02:37