简体   繁体   中英

git push heroku master - FAIL

I added an SSH key to Github for committing my code. Everything worked perfectly. Then I tried to commit to Heroku to get my app live using the following steps:

[omrails]$heroku keys:add
# Found the following SSH public keys:
# 1) github_rsa.pub 2) id_rsa.pub

# Which would you like to use with your Heroku account? 2 
# Uploading SSH public key /Users/jackburum/.ssh/id_rsa.pub... done

[omrails]$heroku create

# Creating calm-earth-1147... done, stack is cedar
# http://calm-earth-1147.herokuapp.com/ |
# git@heroku.com:calm-earth-1147.git

[omrails]$git push heroku master

# !  Your key with fingerprint *************** is not authorized to access omrails.
# fatal: The remote end hung up unexpectedly

Then I tried clearing the Heroku keys (heroku keys:clear) and adding the keys again... to no avail. I also changed my SSH key in Github to see if that was the problem. What can I do differently?

I also struggled with SSH keys, specially due to my multiple accounts on Heroku. Then I found this https://github.com/ddollar/heroku-accounts which does an amazing job helping you use multiple accounts on Heroku.

Right now your I will guess that 'heroku' origin is pointing at an incorrect Heroku application. To fix this perform the following.

  1. Remove the heroku origin - git remote rm heroku
  2. Readd the heroku origin pointing at calm-earth-1147 app - git remote add heroku git@heroku.com: calm-earth-1147.git
  3. confirm it added correctly, git remote -v

The technical post webpages of this site follow the CC BY-SA 4.0 protocol. If you need to reprint, please indicate the site URL or the original address.Any question please contact:yoyou2525@163.com.

 
粤ICP备18138465号  © 2020-2024 STACKOOM.COM