# Failed to push branch: Environment has not been initialized, please send an apimap to proceed

**URL:** <https://community.forestadmin.com/t/failed-to-push-branch-environment-has-not-been-initialized-please-send-an-apimap-to-proceed/7775>\
**Category:** Help me!\
**Created:** [January 23, 2025, 1:46pm UTC](https://community.forestadmin.com/t/failed-to-push-branch-environment-has-not-been-initialized-please-send-an-apimap-to-proceed/7775 "2025-01-23T13:46:28Z")\
**Posts on this page:** 6\
**Page:** 1

<div class="post-metadata">

**Author:** ![seb](https://avatars.discourse-cdn.com/v4/letter/s/8edcca/32.png) [@seb](https://community.forestadmin.com/u/seb)\
**Post date:** [January 23, 2025, 1:46pm UTC](https://community.forestadmin.com/t/failed-to-push-branch-environment-has-not-been-initialized-please-send-an-apimap-to-proceed/7775/1 "2025-01-23T13:46:28Z")

</div>

I want to develop a new smart action regarding a given model.

## Feature(s) impacted

forest push

What I do:

- install forest-cli with `npm install -g forest-cli`
- init with `forest init`
- set FOREST\_AUTH\_SECRET and FOREST\_ENV\_GIVEN as given and restart local server
- create a new branch with `forest branch duplicate --origin Staging`
- develop backend side of the feature
- push the branch with `forest push`

## Observed behavior

When trying to push with `forest push`, the following error occurs:

> × Failed to push branch: Environment Development | sébastiencarceles2 has not been initialized, please send an apimap to proceed.

## Expected behavior

Branch should be pushed.

## Context

- Project name: Hubflo
- Agent technology: rails
- Agent (forest package) name & version: forest\_liana 9.7.0
- Database type: postgresql

---

<div class="post-metadata">

**Author:** ![Alban\_Bertolini](https://dub1.discourse-cdn.com/flex013/user_avatar/community.forestadmin.com/alban_bertolini/32/1077_2.png) [@Alban\_Bertolini](https://community.forestadmin.com/u/Alban_Bertolini)\
**Post date:** [January 23, 2025, 2:14pm UTC](https://community.forestadmin.com/t/failed-to-push-branch-environment-has-not-been-initialized-please-send-an-apimap-to-proceed/7775/2 "2025-01-23T14:14:12Z")

</div>

Hello,  
Could you double check if your FOREST\_ENV\_SECRET matches to the right environment?

When you are starting your server, do you see an error because when it starts, it sends the apimap to forest ?

---

<div class="post-metadata">

**Author:** ![seb](https://avatars.discourse-cdn.com/v4/letter/s/8edcca/32.png) [@seb](https://community.forestadmin.com/u/seb)\
**Post date:** [January 23, 2025, 2:35pm UTC](https://community.forestadmin.com/t/failed-to-push-branch-environment-has-not-been-initialized-please-send-an-apimap-to-proceed/7775/3 "2025-01-23T14:35:07Z")

</div>

Which environment should I use ? Staging or the Development environment that has been created when I ran `forest init`?

---

<div class="post-metadata">

**Author:** ![seb](https://avatars.discourse-cdn.com/v4/letter/s/8edcca/32.png) [@seb](https://community.forestadmin.com/u/seb)\
**Post date:** [January 23, 2025, 2:36pm UTC](https://community.forestadmin.com/t/failed-to-push-branch-environment-has-not-been-initialized-please-send-an-apimap-to-proceed/7775/4 "2025-01-23T14:36:27Z")

</div>

There is no error when starting up.

---

<div class="post-metadata">

**Author:** ![Alban\_Bertolini](https://dub1.discourse-cdn.com/flex013/user_avatar/community.forestadmin.com/alban_bertolini/32/1077_2.png) [@Alban\_Bertolini](https://community.forestadmin.com/u/Alban_Bertolini)\
**Post date:** [January 23, 2025, 2:55pm UTC](https://community.forestadmin.com/t/failed-to-push-branch-environment-has-not-been-initialized-please-send-an-apimap-to-proceed/7775/5 "2025-01-23T14:55:47Z")

</div>

Your Development environment 👈

---

<div class="post-metadata">

**Author:** ![seb](https://avatars.discourse-cdn.com/v4/letter/s/8edcca/32.png) [@seb](https://community.forestadmin.com/u/seb)\
**Post date:** [January 23, 2025, 3:33pm UTC](https://community.forestadmin.com/t/failed-to-push-branch-environment-has-not-been-initialized-please-send-an-apimap-to-proceed/7775/6 "2025-01-23T15:33:11Z")

</div>

It works now, thank you
