Reputation: 77
I'm trying to migrate from Circle CI 1.0 to 2.0 and it seems to be a real pain.
I have the following config for Circle 2.0:
steps:
- checkout
run: bundle exec wget -qO- https://cli-assets.heroku.com/install-ubuntu.sh | sh
run: heroku scale worker=0 --app xxxx-yyy
run: "[[ ! -s \"$(git rev-parse --git-dir)/shallow\" ]] || git fetch --unshallow"
- run: git push [email protected]:xxxx-yyy.git $CIRCLE_SHA1:refs/heads/master
- run: heroku run rake db:migrate --app xxxx-yyy
And the for the most part, it works. It will go through these commands - however when interacting with Heroku I receive these errors:
Scaling dynos... ! ▸ Invalid credentials ▸ provided. heroku: Enter your login credentials Email: Scaling dynos... ! ▸ Invalid credentials ▸ provided. Enter your Heroku credentials: Email:
It's odd because on the 1.0 branch, I can scale Heroku and run db:migrate without any need for additional config.
Does anyone have any advice on this?
Upvotes: 0
Views: 241
Reputation: 12553
The CircleCI docs for both 1.0 and 2.0 indicate they expect you to be configuring a Heroku API key:
Excerpt of the 2.0 instructions:
Add the name of your Heroku application and your Heroku API key as environment variables. See Adding Project Environment Variables for instructions. In this example, these variables are defined as HEROKU_APP_NAME and HEROKU_API_KEY, respectively.
...
git push https://heroku:[email protected]/$HEROKU_APP_NAME.git master
Source: https://circleci.com/docs/2.0/deployment-integrations/#heroku
Personally I've also used SSH keys but using the API key approach looks pretty explicit and straightforward.
Upvotes: 2