Skip to content

Instantly share code, notes, and snippets.

@shu0115
Created December 4, 2013 03:07
Show Gist options
  • Save shu0115/7781706 to your computer and use it in GitHub Desktop.
Save shu0115/7781706 to your computer and use it in GitHub Desktop.
Heroku複数アカウント設定 - heroku-accounts ref: http://qiita.com/shu_0115/items/736c34c96302592960a1
heroku plugins:install git://github.com/ddollar/heroku-accounts.git
----------
Installing heroku-accounts... done
----------
heroku accounts:add first
! Your account xxxxxxxxxx@gmail.com does not have access to xxxxx.
!
! SSH Key Fingerprint: 47:95:51:c4:28:3f:6f:32:7b:e9:fb:27:83:db:de:5f
fatal: Could not read from remote repository.
Please make sure you have the correct access rights
and the repository exists.
! Your key with fingerprint xx:xx:xx:xx:xx:xx:xx:xx:xx:xx:xx:xx:xx:xx:xx:xx is not authorized to access application-name.
fatal: The remote end hung up unexpectedly
heroku keys:clear
# Clears all existing keys (do this if you only have one key, otherwise use $ heroku keys:remove key)
heroku keys:add ~/.ssh/identity.heroku.second.pub
# Uploads your new personal SSH key
heroku accounts:set second
# Sets the account again
git push heroku master
heroku accounts:add first --auto
heroku accounts:add second
heroku accounts:add second --auto
# in project root
heroku accounts:set second
heroku accounts
----------
second
first
----------
heroku accounts:remove first
heroku accounts:default first
heroku accounts
----------
second
* first
----------
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment