# Environmental variable help

**URL:** <https://community.doppler.com/t/environmental-variable-help/1052>\
**Category:** Need Help\
**Created:** [March 21, 2023, 8:41pm UTC](https://community.doppler.com/t/environmental-variable-help/1052 "2023-03-21T20:41:26Z")\
**Posts on this page:** 3\
**Page:** 1

<div class="post-metadata">

**Author:** ![jbrwn](https://sea2.discourse-cdn.com/flex016/user_avatar/community.doppler.com/jbrwn/32/723_2.png) [@jbrwn](https://community.doppler.com/u/jbrwn)\
**Post date:** [March 21, 2023, 8:41pm UTC](https://community.doppler.com/t/environmental-variable-help/1052/1 "2023-03-21T20:41:26Z")

</div>

Hello - I have a doppler project **Project A** that is integrated. with a [fly.io](http://fly.io) app. This adds the DOPPLER\_CONFIG, DOPPLER\_ENVIRONMENT, and DOPPLER\_PROJECT secrets to my project. Ok great.

However, in the app for **Project A** i would like set secrets for doppler **Project B**. So i install the doppler cli in **Project A** , create a service token for **Project B** , and add the service token as a secret named DOPPLER\_TOKEN in **Project A**.

A bit confusing i know. But when i try to set secrets for **Project B** from within **Project A** i get the following error

```auto
Unable to set secrets
 Doppler Error: This token does not have access to requested project 'PROEJCT A'

```

I believe DOPPLER\_CONFIG, DOPPLER\_ENVIRONMENT, and DOPPLER\_PROJECT environmental variables are causing he CLI tool to think i want to push secrets to **Project A** event though my token is for **Project B**.

Anybody have tips on how to workaround this issue? thanks in advance.

---

<div class="post-metadata">

**Author:** ![watsonian](https://sea2.discourse-cdn.com/flex016/user_avatar/community.doppler.com/watsonian/32/267_2.png) [@watsonian](https://community.doppler.com/u/watsonian)\
**Post date:** [March 21, 2023, 8:54pm UTC](https://community.doppler.com/t/environmental-variable-help/1052/2 "2023-03-21T20:54:31Z")

</div>

Hi @jbrwn,

There are a couple possible solutions for this. The first, and potentially simplest solution if you’re doing this from a shell script is unset those variables in script:

```bash
#!/usr/bin/env bash

DOPPLER_PROJECT=""
DOPPLER_CONFIG=""

doppler secrets set ...

```

Another option would be to manually specify the project and config using those flags:

```bash
doppler secrets set -p PROJECT -c CONFIG ...

```

Those flags take precedence over the environment variables that are set.

Finally, you could use the `--no-read-env` flag:

```bash
doppler secrets set --token YOUR_TOKEN --no-read-env ...

```

That option would require you to pass the token in via the flag though, which would mean it would show up in a process listing while the command runs.

Will any of those options work for you?

Regards,  
-Joel

---

<div class="post-metadata">

**Author:** ![jbrwn](https://sea2.discourse-cdn.com/flex016/user_avatar/community.doppler.com/jbrwn/32/723_2.png) [@jbrwn](https://community.doppler.com/u/jbrwn)\
**Post date:** [March 21, 2023, 9:07pm UTC](https://community.doppler.com/t/environmental-variable-help/1052/3 "2023-03-21T21:07:56Z")

</div>

Thank you for the quick reply. Wow yes potentially all of these would work. I tried simply unsetting the variables in my shell script and yes that worked. Appreciate the guidance here. Thanks!
