0

I wanted to login to Heroku cli using Visual Studio Team Services release pipelines, the cmd line to login to Heroku is:

heroku login

Executing that command, Heroku cli will prompt this:

Email:
Password:

I don't know how to automate the inputs for that prompt, I would like to write a command or bash to login every time the task is executing.

EDITED If it was from another platform, for example Github, then how do I automate a cmd prompt?

Screenshots:

My pipeline

Results from Heroku Cli

Lolpez
  • 849
  • 8
  • 17

1 Answers1

0

The best way it's to provide the credentials inline, for example, if you want to clone a Git repo from GitHub:

git clone https://username:password@github.com/username/repository.git

In Heroku case is impossible because they don't support this way. you can accomplish the accomplish heroku login by edit the ~/.netrc file - find the way in the above-provided answer.

But - you can try to answer the prompt automatically in this way:

(
  echo "EMAIL" 
  echo "PASSWORD"
) | heroku login
Shayki Abramczyk
  • 36,824
  • 16
  • 89
  • 114