[英]Terminal login-credentials to heroku with bash-script?
I'm trying to write a bash script that logs in and creates some stuff on Heroku. 我正在尝试编写一个bash脚本来登录并在Heroku上创建一些东西。 Now I have to supply username and password every time.
现在,我必须每次都提供用户名和密码。 Is it possible to do this automatically, either with some bash-magic or passing variables with the login-function?
是否可以通过一些bash-magic或使用登录功能传递变量来自动执行此操作?
PS I'm mostly interested in supplying the e-mail-adress, not the password. PS我最感兴趣的是提供电子邮件地址,而不是密码。
this is what it looks like: 看起来是这样的:
$ heroku auth:login
Enter your Heroku credentials:
Email: email@example.com
Password (typing will be hidden):
Authentication successful.
I would look at using the Heroku API here instead of the CLI. 我将在这里使用Heroku API而不是CLI。 For instance Heroku.rb is probably a good start if you're happy with using Ruby.
例如,如果您对使用Ruby感到满意,那么Heroku.rb可能是一个不错的开始。
https://github.com/heroku/heroku.rb https://github.com/heroku/heroku.rb
By writing it as a Ruby script you can then wrap it up in bash or whatever. 通过将其编写为Ruby脚本,您可以将其包装为bash或其他形式。
声明:本站的技术帖子网页,遵循CC BY-SA 4.0协议,如果您需要转载,请注明本站网址或者原文地址。任何问题请咨询:yoyou2525@163.com.