# Heroku deployment with 2.0 - which one should we use?

**URL:** <https://discuss.circleci.com/t/heroku-deployment-with-2-0-which-one-should-we-use/27257>\
**Category:** Deployments\
**Tags:** heroku\
**Created:** [December 20, 2018, 2:38am UTC](https://discuss.circleci.com/t/heroku-deployment-with-2-0-which-one-should-we-use/27257 "2018-12-20T02:38:30Z")\
**Posts on this page:** 3\
**Page:** 1

<div class="post-metadata">

**Author:** ![dinshaw](https://sea2.discourse-cdn.com/circleci/user_avatar/discuss.circleci.com/dinshaw/32/2327_2.png) [@dinshaw](https://discuss.circleci.com/u/dinshaw)\
**Post date:** [December 20, 2018, 2:38am UTC](https://discuss.circleci.com/t/heroku-deployment-with-2-0-which-one-should-we-use/27257/1 "2018-12-20T02:38:30Z")

</div>

The docs are still contradicting each other on how to do a Heroku deployment. Can someone please explain what the CircleCI recommended way is?

1. [https://circleci.com/docs/2.0/deployment-integrations/#heroku](https://circleci.com/docs/2.0/deployment-integrations/#heroku)  
Looks good, but generates a heroku auth error  
WARNING:  
remote: ! Do not authenticate with username and password using git.  
remote: ! Run `heroku login` to update your credentials, then retry the git command.

2. Under app settings “Heroku Deployment” it has  
deployment:  
staging:  
branch: master  
heroku:  
appname: foo-bar-123  
This was for 1.0 and should be ignored completely?

3. Use a .circleci/setup\_heroku.sh with manually configured ssh keys. This is the only working solution that I have been able to implement.  
Taken from [https://gist.github.com/lauraturk/93742fd34101a0f15b988f3d3b27104d](https://gist.github.com/lauraturk/93742fd34101a0f15b988f3d3b27104d)

---

<div class="post-metadata">

**Author:** ![levlaz](https://sea2.discourse-cdn.com/circleci/user_avatar/discuss.circleci.com/levlaz/32/36978_2.png) [@levlaz](https://discuss.circleci.com/u/levlaz)\
**Post date:** [December 23, 2018, 10:13pm UTC](https://discuss.circleci.com/t/heroku-deployment-with-2-0-which-one-should-we-use/27257/2 "2018-12-23T22:13:25Z")

</div>

> [@dinshaw](#):
>
> Under app settings “Heroku Deployment” it has  
> deployment:  
> staging:  
> branch: master  
> heroku:  
> appname: foo-bar-123  
> This was for 1.0 and should be ignored completely?

Yes this is for 1.0 and should be ignored completely.

> [@dinshaw](#):
>
> Do not authenticate with username and password using git.

This looks like your remote branch is `https` instead of `git`. You should use `git` so that it does key authentication instead of password authentication. Can you give that a try? If that works, we should update the docs because this looks like a poor practice.

---

<div class="post-metadata">

**Author:** ![system](https://global.discourse-cdn.com/circleci/original/3X/5/1/511608acda8e85906e15909b57bd0a46c1dbe291.png) [@system](https://discuss.circleci.com/u/system)\
**Post date:** [March 23, 2019, 10:25pm UTC](https://discuss.circleci.com/t/heroku-deployment-with-2-0-which-one-should-we-use/27257/3 "2019-03-23T22:25:08Z")

</div>

Closed on March 23, 2019, 10:25pm UTC

This topic was automatically closed 90 days after the last reply. New replies are no longer allowed.
