Heroku Toolbelt switch between multiple account

孤街醉人 提交于 2019-12-21 03:12:08

问题


I would like to know what's the best way to switch between heroku account using the heroku toolbelt.

I'm used to have a personnal heroku account which is a collaborator of all of my professionnal heroku app. The problem is when I want to make some changes that have a financial impact : adding / removing addon for example, I cannot do it as a collaborator.
Before heroku toolbelt I was used to change the content of the file ~/.heroku/credentials but it does not exists anymore with the toolbelt.


回答1:


Have you tried the heroku accounts plugin?




回答2:


In 2017, Heroku released heroku-accounts, an add-on to the toolbelt that lets one quickly switch accounts from the command line. Install it like this:

heroku plugins:install heroku-accounts

Then add an account ("work" in this case):

heroku accounts:add work

At this point, you'll need to provide the credentials you want associated with the "work" alias. Do the same for other accounts you have. Then switch between aliases like this:

heroku accounts:set work

(Sorry to zombie this question.)




回答3:


You can just run the login again from the command line:

heroku login

Enter your new email and password for the other account.



来源:https://stackoverflow.com/questions/13140375/heroku-toolbelt-switch-between-multiple-account

易学教程内所有资源均来自网络或用户发布的内容,如有违反法律规定的内容欢迎反馈
该文章没有解决你所遇到的问题?点击提问,说说你的问题,让更多的人一起探讨吧!