# "Skipping a deployment with the heroku provider because this branch is not permitted: main" despite no condition

**URL:** <https://travis-ci.community/t/skipping-a-deployment-with-the-heroku-provider-because-this-branch-is-not-permitted-main-despite-no-condition/10195>\
**Category:** Deployment\
**Tags:** dpl-heroku\
**Created:** [October 18, 2020, 12:39pm UTC](https://travis-ci.community/t/skipping-a-deployment-with-the-heroku-provider-because-this-branch-is-not-permitted-main-despite-no-condition/10195 "2020-10-18T12:39:39Z")\
**Posts on this page:** 2\
**Page:** 1

<div class="post-metadata">

**Author:** ![Rowleen](https://sea1.discourse-cdn.com/flex015/user_avatar/travis-ci.community/rowleen/32/5342_2.png) [@Rowleen](https://travis-ci.community/u/Rowleen)\
**Post date:** [October 18, 2020, 12:39pm UTC](https://travis-ci.community/t/skipping-a-deployment-with-the-heroku-provider-because-this-branch-is-not-permitted-main-despite-no-condition/10195/1 "2020-10-18T12:39:39Z")

</div>

Hi!  
I’m traying to deploy on Heroku and get the next message:

> Skipping a deployment with the heroku provider because this branch is not permitted: main

Here is my config file

```yml
language: node_js
cache:
  directories:
    - ~/.npm
node_js:
  - '12'
git:
  depth: 3
script:
  - yarn test
  - yarn build
deploy:
  provider: heroku
  api_key:
    secure: my-encrypted-api-key

```

I cheked the next option on Heroku:  
 ![image](https://us1.discourse-cdn.com/flex015/uploads/travis_ci/original/2X/c/cf6b63c222039e2bde8d111d650b90411561bb7b.png)

I used this line to generate the api key:

```bach
travis encrypt $(heroku auth:token) --add deploy.api_key

```

My principal and unique branch on github is **main**.

URL of logs: [Travis CI - Test and Deploy with Confidence](https://travis-ci.org/github/Rowleen/platzi-proof/builds/736800188)

Thanks in advance.

---

<div class="post-metadata">

**Author:** ![native-api](https://sea1.discourse-cdn.com/flex015/user_avatar/travis-ci.community/native-api/32/430_2.png) [@native-api](https://travis-ci.community/u/native-api)\
**Post date:** [November 20, 2020, 3:19am UTC](https://travis-ci.community/t/skipping-a-deployment-with-the-heroku-provider-because-this-branch-is-not-permitted-main-despite-no-condition/10195/3 "2020-11-20T03:19:17Z")

</div>

[**A deployment clause has a default implicit condition of `branch: master`.**](https://docs.travis-ci.com/user/deployment/#conditional-releases-with-on) Your branch `main` doesn’t fulfill it.

So depending on your needs, you need to either adjust that condition (e.g. `branch: main`) or remove it with `all_branches: true`.
