I\'m having trouble when working with multiple Heroku accounts on my computer.
The thing is that it\'s worked great before by switching accounts with the heroku gem.
I'd add a couple of things re the heroku-accounts plugin... this example assumes your pre-existing heroku account will be heroku.work and you are adding a new account heroku.personal.
It also describes how to move an app from one to the other, for example, if you have hit your 25-app max and are creating a new account and want to move some of your side projects and experimental apps out of your main account.
heroku accounts:set personal
) until after you transfer the app using the heroku sharing
commmand as described https://devcenter.heroku.com/articles/transferring-appsSo the steps you probably need are:
heroku accounts:add work --auto
to create a new heroku.work account to replace your old default account (so use the same credentials you've been using all along). You ALSO need to upload your new key to heroku: heroku keys:add ~/.ssh/identity.heroku.work.pub
heroku accounts:add personal --auto
to create a new heroku.personal account (eg use your new credentials for your new heroku account). You ALSO need to upload your new key to heroku: heroku keys:add ~/.ssh/identity.heroku.personal.pub
heroku accounts:set work
(all that does it setup git to use your heroku.work, which is (unin this example) the same heroku account you've been using all along, only now it's called heroku.work. heroku sharing:add <new owner email>
(b) in your local directory, switch the app to heroku.personal using heroku accounts:set personal
(c) transfer** the app from the old account to the new account using heroku sharing:transfer <new owner email>
then (d) remove the old email address collaborator (if you want to) using heroku sharing:remove <old owner email>
** Note the heroku link I provided says there are special requirements to move an app with any paid resources. Generally, remove the paid resoures, then add them back later, or have support do it.
I started using the heroku-accounts plugin but then realized my buddy could just make me a collaborator on his heroku account and that was all that was needed.
I have the exact same problem.
This is not the answer, but a temp solution is to add your "standard" heroku email as a collaborator to the app you can't access.
You've got to be accepted as a collaborator on the project you don't own.
It works like this (using git) :
And that should be all folks ; you just have to push on the other remote when deploying on the other app.
I used nano .git/config then replaced value of url of remote "heroku" with heroku.com > apps > settings > Reveal config vars > Heroku Git URL
To get this to work for me with both Git and the Heroku console, I had to add create the ssh config as instructed by bantic, but I also had to create two remotes to my .git config:
[remote "origin"]
url = git@heroku.work:pacific-rock-4904.git
fetch = +refs/heads/*:refs/remotes/heroku/*
[remote "heroku"]
url = git@heroku.com:pacific-rock-4904.git
fetch = +refs/heads/*:refs/remotes/heroku/*