# CircleCI builds with Doppler are failling

**URL:** <https://community.doppler.com/t/circleci-builds-with-doppler-are-failling/82>\
**Category:** Need Help\
**Created:** [January 22, 2021, 12:01am UTC](https://community.doppler.com/t/circleci-builds-with-doppler-are-failling/82 "2021-01-22T00:01:04Z")\
**Posts on this page:** 7\
**Page:** 1

<div class="post-metadata">

**Author:** ![axw](https://sea2.discourse-cdn.com/flex016/user_avatar/community.doppler.com/axw/32/54_2.png) [@axw](https://community.doppler.com/u/axw)\
**Post date:** [January 22, 2021, 12:01am UTC](https://community.doppler.com/t/circleci-builds-with-doppler-are-failling/82/1 "2021-01-22T00:01:05Z")

</div>

I’ve added the commands in the CircleCI guides to my CircleCI build steps:  
`curl -Ls https://cli.doppler.com/install.sh || wget -qO- https://cli.doppler.com/install.sh) | sh`

And I’m getting the following error:

```
Downloading la **** release
Installing...
dpkg: error: requested operation requires superuser privilege
ERROR: script failed during execution
For more verbose output, re-run this script with the debug flag (./install.sh --debug)

```

Has anyone seen this before?

---

<div class="post-metadata">

**Author:** ![ryan-blunden](https://sea2.discourse-cdn.com/flex016/user_avatar/community.doppler.com/ryan-blunden/32/9_2.png) [@ryan-blunden](https://community.doppler.com/u/ryan-blunden)\
**Post date:** [January 22, 2021, 1:07am UTC](https://community.doppler.com/t/circleci-builds-with-doppler-are-failling/82/2 "2021-01-22T01:07:47Z")

</div>

Hi axw,

Welcome to the Doppler community!

As it seems you’re using a Linux executor (with no root access or sudo privileges), you’ll need a slightly different command that will download the binary to a location you have write access to, e.g. the current directory.

This is covered in our [CircleCI docs](https://docs.doppler.com/docs/circleci#linux-executor) and the command you need is:

```bash
# Downloads binary to current directory and sets executable permissions
(curl -Ls https://cli.doppler.com/install.sh || wget -qO- https://cli.doppler.com/install.sh) | sh -s -- --no-install --no-package-manager

```

---

<div class="post-metadata">

**Author:** ![axw](https://sea2.discourse-cdn.com/flex016/user_avatar/community.doppler.com/axw/32/54_2.png) [@axw](https://community.doppler.com/u/axw)\
**Post date:** [January 22, 2021, 1:45am UTC](https://community.doppler.com/t/circleci-builds-with-doppler-are-failling/82/3 "2021-01-22T01:45:07Z")

</div>

Thanks Ryan, I’ve now been able to download Doppler successfully during the build.

But I cannot successfully run my server with injected secrets. Here’s the output

```
#!/bin/bash -eo pipefail ./doppler run --token npm run test-server

Unable to fetch secrets from the Doppler API Doppler Error: Invalid auth token Reading secrets from fallback file Doppler Error: The fallback file does not exist

```

My interpretation of the docs is that as long as $DOPPER\_TOKEN is set as an env var on CircleCI, I would be able to use `./doppler run --token` to start my server

---

<div class="post-metadata">

**Author:** ![brian-vallelunga](https://sea2.discourse-cdn.com/flex016/user_avatar/community.doppler.com/brian-vallelunga/32/3_2.png) [@brian-vallelunga](https://community.doppler.com/u/brian-vallelunga)\
**Post date:** [January 22, 2021, 2:26am UTC](https://community.doppler.com/t/circleci-builds-with-doppler-are-failling/82/4 "2021-01-22T02:26:31Z")

</div>

Hey @axw just to chime in here. Are you naming the token in CirceCI `$DOPPLER_TOKEN` or `DOPPLER_TOKEN`? If so, the extra `$` prefix is the issue I believe.

---

<div class="post-metadata">

**Author:** ![ryan-blunden](https://sea2.discourse-cdn.com/flex016/user_avatar/community.doppler.com/ryan-blunden/32/9_2.png) [@ryan-blunden](https://community.doppler.com/u/ryan-blunden)\
**Post date:** [January 22, 2021, 2:37am UTC](https://community.doppler.com/t/circleci-builds-with-doppler-are-failling/82/5 "2021-01-22T02:37:58Z")

</div>

It could also be because of the `—token` flag. You can safely remove that if the `$DOPPLER_TOKEN` environment variable is set.

Can you try:

```bash
./doppler run -- npm run test-server

```

---

<div class="post-metadata">

**Author:** ![axw](https://sea2.discourse-cdn.com/flex016/user_avatar/community.doppler.com/axw/32/54_2.png) [@axw](https://community.doppler.com/u/axw)\
**Post date:** [January 22, 2021, 6:13am UTC](https://community.doppler.com/t/circleci-builds-with-doppler-are-failling/82/6 "2021-01-22T06:13:49Z")

</div>

Thanks both! @ryan-blunden 's suggestion did the trick. I also had to prepend `doppler run` to a few other scripts

---

<div class="post-metadata">

**Author:** ![ryan-blunden](https://sea2.discourse-cdn.com/flex016/user_avatar/community.doppler.com/ryan-blunden/32/9_2.png) [@ryan-blunden](https://community.doppler.com/u/ryan-blunden)\
**Post date:** [January 22, 2021, 12:53pm UTC](https://community.doppler.com/t/circleci-builds-with-doppler-are-failling/82/7 "2021-01-22T12:53:26Z")

</div>

Great to hear it’s all working for you!
