# \#envars

**URL:** https://discuss.circleci.com/tag/envars/54.md

[Latest](https://discuss.circleci.com/latest.md) · [Categories](https://discuss.circleci.com/categories.md) · [Tags](https://discuss.circleci.com/tags.md)

---

## [How to detect if Circle is running with SSH?](https://discuss.circleci.com/t/how-to-detect-if-circle-is-running-with-ssh/32960)

<div class="topic-metadata">

**Author:** [@matanlb](https://discuss.circleci.com/u/matanlb)\
**Replies:** 2\
**Last updated:** [March 8, 2024, 11:41am UTC](https://discuss.circleci.com/t/how-to-detect-if-circle-is-running-with-ssh/32960 "2024-03-08T11:41:54Z")

</div>

Hello, Anyone know how can I detect when Circle is running with SSH enabled? i.e if the current run is a standard one or a re-run with SSH enabled. JIC ur curious we running automated UI test, which we preload data in…

---

## [Passing environment variables to docker containers](https://discuss.circleci.com/t/passing-environment-variables-to-docker-containers/34662)

<div class="topic-metadata">

**Author:** [@msvab](https://discuss.circleci.com/u/msvab)\
**Replies:** 10\
**Last updated:** [November 16, 2023, 7:02pm UTC](https://discuss.circleci.com/t/passing-environment-variables-to-docker-containers/34662 "2023-11-16T19:02:29Z")

</div>

I’d like to pass an API key to a docker container, but I can’t figure out if there is a way to do it. Obviously I don’t want to keep the key in my source files. jobs: test\_e2e: docker: - image: c…

---

## [Share environment variable between different job](https://discuss.circleci.com/t/share-environment-variable-between-different-job/45647)

<div class="topic-metadata">

**Author:** [@olgkpln](https://discuss.circleci.com/u/olgkpln)\
**Replies:** 3\
**Last updated:** [October 3, 2022, 2:07pm UTC](https://discuss.circleci.com/t/share-environment-variable-between-different-job/45647 "2022-10-03T14:07:43Z")

</div>

I’m trying to pass an environment variable value from one job to another in the following way - run: command: | echo 'export MY\_ENV\_VAR="FOO"' \>\> "$BASH\_ENV" - run: command: | echo $…

---

## [How can I set config.yml environment variables with ones setted from UI](https://discuss.circleci.com/t/how-can-i-set-config-yml-environment-variables-with-ones-setted-from-ui/45382)

<div class="topic-metadata">

**Author:** [@JSmith](https://discuss.circleci.com/u/JSmith)\
**Replies:** 2\
**Last updated:** [September 14, 2022, 2:11pm UTC](https://discuss.circleci.com/t/how-can-i-set-config-yml-environment-variables-with-ones-setted-from-ui/45382 "2022-09-14T14:11:55Z")

</div>

I have a config.yml file and I set some environment variable inside of it as so environment: CREDENTIALS: "credentials.json" DB\_PASSWORD: ${STAGING\_DB\_PASSWORD} The problem is DB\_PASSWORD gets the val…

---

## [Unable to find context ID](https://discuss.circleci.com/t/unable-to-find-context-id/44886)

<div class="topic-metadata">

**Author:** [@Joshua\_Igoni](https://discuss.circleci.com/u/Joshua_Igoni)\
**Replies:** 3\
**Last updated:** [August 1, 2022, 7:11am UTC](https://discuss.circleci.com/t/unable-to-find-context-id/44886 "2022-08-01T07:11:46Z")

</div>

hi all, am currently trying to update an environment variable in a context in my organisation and according to the api reference: CircleCI API it says it is required that my context id has to be part of the path in the …

---

## [Aws s3 suddenly failing with "Unable to locate credentials"](https://discuss.circleci.com/t/aws-s3-suddenly-failing-with-unable-to-locate-credentials/44416)

<div class="topic-metadata">

**Author:** [@ItsSmiffy](https://discuss.circleci.com/u/ItsSmiffy)\
**Replies:** 1\
**Last updated:** [June 13, 2022, 3:50pm UTC](https://discuss.circleci.com/t/aws-s3-suddenly-failing-with-unable-to-locate-credentials/44416 "2022-06-13T15:50:24Z")

</div>

The build has been working correctly since it was setup (a long time ago) but as of the end of last week a step to upload build artefacts to an AWS S3 bucket is now failing with the output “Unable to locate credentials”. …

---

## [Get orb version as environment variable while running job](https://discuss.circleci.com/t/get-orb-version-as-environment-variable-while-running-job/42021)

<div class="topic-metadata">

**Author:** [@elliott-king](https://discuss.circleci.com/u/elliott-king)\
**Replies:** 1\
**Last updated:** [November 29, 2021, 11:27pm UTC](https://discuss.circleci.com/t/get-orb-version-as-environment-variable-while-running-job/42021 "2021-11-29T23:27:09Z")

</div>

Hello! We have authored a CircleCI orb. It’s relatively simple, this is what it does: record the current CIRCLE\_BRANCH, CIRCLE\_PROJECT\_REPONAME, CIRCLE\_PROJECT\_USERNAME make a call to our API with the above informati…

---

## [Passing environment variables to aws ssh connection](https://discuss.circleci.com/t/passing-environment-variables-to-aws-ssh-connection/41567)

<div class="topic-metadata">

**Author:** [@gsasikiran](https://discuss.circleci.com/u/gsasikiran)\
**Replies:** 0\
**Last updated:** [October 19, 2021, 9:03am UTC](https://discuss.circleci.com/t/passing-environment-variables-to-aws-ssh-connection/41567 "2021-10-19T09:03:20Z")

</div>

We are connecting to aws ec2 instance with ssh key and command from circleci. So, currently we are running ssh commands for every job to connect to aws. So, this opens a new shell everytime we run a ssh command to connec…

---

## [Project Environment Variable Is Not Replaced](https://discuss.circleci.com/t/project-environment-variable-is-not-replaced/40135)

<div class="topic-metadata">

**Author:** [@serhatozgel](https://discuss.circleci.com/u/serhatozgel)\
**Replies:** 2\
**Last updated:** [May 21, 2021, 7:52pm UTC](https://discuss.circleci.com/t/project-environment-variable-is-not-replaced/40135 "2021-05-21T19:52:40Z")

</div>

Hi, I have a project environment variable named CODECOV\_TOKEN and I am trying to use it as part of the following command: - run: command: codecov -f "\*\*/coverage.opencover.xml" -t ${CODECOV\_TOKEN} This results in a…

---

## [CI\_PULL\_REUQEST and other PR environment variables are missing](https://discuss.circleci.com/t/ci-pull-reuqest-and-other-pr-environment-variables-are-missing/38535)

<div class="topic-metadata">

**Author:** [@drogerschariot](https://discuss.circleci.com/u/drogerschariot)\
**Replies:** 1\
**Last updated:** [January 8, 2021, 9:07pm UTC](https://discuss.circleci.com/t/ci-pull-reuqest-and-other-pr-environment-variables-are-missing/38535 "2021-01-08T21:07:54Z")

</div>

After merging PRs from github, the build that runs doesn’t contain any of the PR environment variables like CIRCLE\_PR\_NUMBER, CIRCLE\_PR\_REPONAME, and CIRCLE\_PR\_USERNAME.

---

## [Cast an environment variable to a boolean](https://discuss.circleci.com/t/cast-an-environment-variable-to-a-boolean/37867)

<div class="topic-metadata">

**Author:** [@steve](https://discuss.circleci.com/u/steve)\
**Replies:** 2\
**Last updated:** [October 23, 2020, 8:26am UTC](https://discuss.circleci.com/t/cast-an-environment-variable-to-a-boolean/37867 "2020-10-23T08:26:05Z")

</div>

I am using the Cypress orb and I want to set a boolean field to either true or false based off an Environment variable inside my CircleCI config.yml. In the CircleCI UI I have configured an Environment variable called $…

---

## [How can I display Build Time or a Job Time in Slack Status Notification?](https://discuss.circleci.com/t/how-can-i-display-build-time-or-a-job-time-in-slack-status-notification/37561)

<div class="topic-metadata">

**Author:** [@rahulbhatiya-NU](https://discuss.circleci.com/u/rahulbhatiya-NU)\
**Replies:** 0\
**Last updated:** [September 29, 2020, 5:49am UTC](https://discuss.circleci.com/t/how-can-i-display-build-time-or-a-job-time-in-slack-status-notification/37561 "2020-09-29T05:49:53Z")

</div>

Do we have an Environment Variable for Total Build Time or Job Time in Circle CI that we can include in Slack Status Notification? for eg. ${CIRCLE\_BUILD\_TIME} If not, is there any way to get the Build Time in CircleC…

---

## [Enviroment variables available in multiple containers](https://discuss.circleci.com/t/enviroment-variables-available-in-multiple-containers/37302)

<div class="topic-metadata">

**Author:** [@rssk](https://discuss.circleci.com/u/rssk)\
**Replies:** 2\
**Last updated:** [September 3, 2020, 9:32pm UTC](https://discuss.circleci.com/t/enviroment-variables-available-in-multiple-containers/37302 "2020-09-03T21:32:58Z")

</div>

Hey I’ve been trying to get a CI workflow setup, but have run into a snag. We have a setup where a primary container where the tests are run is communicating with multiple services, and all containers need access to sec…

---

## [Unable to set a docker image envar with another envar](https://discuss.circleci.com/t/unable-to-set-a-docker-image-envar-with-another-envar/36130)

<div class="topic-metadata">

**Author:** [@danielfsbarreto](https://discuss.circleci.com/u/danielfsbarreto)\
**Replies:** 6\
**Last updated:** [June 5, 2020, 12:47am UTC](https://discuss.circleci.com/t/unable-to-set-a-docker-image-envar-with-another-envar/36130 "2020-06-05T00:47:23Z")

</div>

Hello, This is my very first experience building a pipeline from scratch on CircleCI. Currently I am having a hard time configuring a postgres image on my project because of wrong assignments of their required environme…

---

## [\[deleted-deleted\]](https://discuss.circleci.com/t/deleted-deleted/35982)

<div class="topic-metadata">

**Author:** [@dimaqq-cci](https://discuss.circleci.com/u/dimaqq-cci)\
**Replies:** 3\
**Last updated:** [May 25, 2020, 12:38pm UTC](https://discuss.circleci.com/t/deleted-deleted/35982 "2020-05-25T12:38:21Z")

</div>

\[deleted-deleted-deleted-deleted\]

---

## [Project Settings Environment Variables not deleted](https://discuss.circleci.com/t/project-settings-environment-variables-not-deleted/35876)

<div class="topic-metadata">

**Author:** [@alexandrulaurus](https://discuss.circleci.com/u/alexandrulaurus)\
**Replies:** 1\
**Last updated:** [May 11, 2020, 12:32pm UTC](https://discuss.circleci.com/t/project-settings-environment-variables-not-deleted/35876 "2020-05-11T12:32:26Z")

</div>

I’m trying to rotate our AWS keys which were stored in each Project Settings as environment variables. They are not referenced in the config.yml file, but they are referenced in the bash scripts used in this file. I de…

---

## [Environment variables list doesn't update when viewing different projects](https://discuss.circleci.com/t/environment-variables-list-doesnt-update-when-viewing-different-projects/33840)

<div class="topic-metadata">

**Author:** [@lennholm](https://discuss.circleci.com/u/lennholm)\
**Replies:** 0\
**Last updated:** [December 20, 2019, 3:43pm UTC](https://discuss.circleci.com/t/environment-variables-list-doesnt-update-when-viewing-different-projects/33840 "2019-12-20T15:43:39Z")

</div>

If I view the environment variables for a project, then view the environment variables for another project, I still see the vars for the first project. I have to refresh the page in order for the correct vars to be loade…

---

## [Can't access environment variables in Windows Powershell](https://discuss.circleci.com/t/cant-access-environment-variables-in-windows-powershell/31990)

<div class="topic-metadata">

**Author:** [@eysi09](https://discuss.circleci.com/u/eysi09)\
**Replies:** 3\
**Last updated:** [September 16, 2019, 9:45am UTC](https://discuss.circleci.com/t/cant-access-environment-variables-in-windows-powershell/31990 "2019-09-16T09:45:47Z")

</div>

Hi! I’m trying out the newly added Windows support and I am unable to access secret environment variables (set via Project =\> Build Settings =\> Environment Variables) when using Powershell. See below for a minimal repr…

---

## [Introspect image info from inside docker executor](https://discuss.circleci.com/t/introspect-image-info-from-inside-docker-executor/31620)

<div class="topic-metadata">

**Author:** [@ruffsl](https://discuss.circleci.com/u/ruffsl)\
**Replies:** 7\
**Last updated:** [August 20, 2019, 6:50pm UTC](https://discuss.circleci.com/t/introspect-image-info-from-inside-docker-executor/31620 "2019-08-20T18:50:14Z")

</div>

I’m trying to introspect into the image used by the current docker executor from inside the same container. I’d like to use this to derive a unique key to later recognise if the same docker image is used in future CI job…

---

## [Huge Security issue with Environment Variables](https://discuss.circleci.com/t/huge-security-issue-with-environment-variables/23175)

<div class="topic-metadata">

**Author:** [@pdeva](https://discuss.circleci.com/u/pdeva)\
**Replies:** 5\
**Last updated:** [June 19, 2019, 11:17pm UTC](https://discuss.circleci.com/t/huge-security-issue-with-environment-variables/23175 "2019-06-19T23:17:17Z")

</div>

The recommended CircleCI guidelines seem to be use environment variables for different environments. Eg: PROD\_AWS\_ACCESS\_KEY\_ID #for prod deployments DEV\_AWS\_ACCESS\_KEY\_ID #for dev deployments However, there is no w…

---

## [Dotenv\_to\_ci - laziest way to transfer environment variables from .env files to a CircleCI](https://discuss.circleci.com/t/dotenv-to-ci-laziest-way-to-transfer-environment-variables-from-env-files-to-a-circleci/30535)

<div class="topic-metadata">

**Author:** [@joshdholtz](https://discuss.circleci.com/u/joshdholtz)\
**Replies:** 0\
**Last updated:** [May 23, 2019, 10:05pm UTC](https://discuss.circleci.com/t/dotenv-to-ci-laziest-way-to-transfer-environment-variables-from-env-files-to-a-circleci/30535 "2019-05-23T22:05:14Z")

</div>

Installation: gem install dotenv\_to\_ci More info: https://github.com/joshdholtz/dotenv\_to\_ci Why: I had 30+ environment variables to set (mostly secrets) that I didn’t want to commit my .env file for in my repo. This o…

---

## [Updating context environment variables during build?](https://discuss.circleci.com/t/updating-context-environment-variables-during-build/29779)

<div class="topic-metadata">

**Author:** [@erodewald](https://discuss.circleci.com/u/erodewald)\
**Replies:** 2\
**Last updated:** [April 13, 2019, 7:31pm UTC](https://discuss.circleci.com/t/updating-context-environment-variables-during-build/29779 "2019-04-13T19:31:21Z")

</div>

Part of my workflow is to generate user tokens for functional testing but we require a refresh\_token which must be updated after each use. I am using an organization “Context” to store environment variables – is it possi…

---

## [Wrong CIRCLE\_PR\_NUMBER](https://discuss.circleci.com/t/wrong-circle-pr-number/29770)

<div class="topic-metadata">

**Author:** [@JAremko](https://discuss.circleci.com/u/JAremko)\
**Replies:** 3\
**Last updated:** [April 13, 2019, 6:33pm UTC](https://discuss.circleci.com/t/wrong-circle-pr-number/29770 "2019-04-13T18:33:52Z")

</div>

https://circleci.com/gh/syl20bnr/spacemacs/29262?utm\_campaign=vcs-integration-link&utm\_medium=referral&utm\_source=github-build-link CIRCLE\_PR\_NUMBER=12170 CI\_PULL\_REQUEST=https://github.com/syl20bnr/spacemacs/pull/1217…

---

## [Passing dynamic environment variable to a secondary docker container](https://discuss.circleci.com/t/passing-dynamic-environment-variable-to-a-secondary-docker-container/28926)

<div class="topic-metadata">

**Author:** [@alexandrugheorghe](https://discuss.circleci.com/u/alexandrugheorghe)\
**Replies:** 13\
**Last updated:** [March 12, 2019, 5:52pm UTC](https://discuss.circleci.com/t/passing-dynamic-environment-variable-to-a-secondary-docker-container/28926 "2019-03-12T17:52:29Z")

</div>

I’m attempting to pass an environment variable to a secondary docker container: jobs: run\_tests: docker: image: circleci/node:10.15 environment: - DB\_NAME: test\_$CIRCLE\_…

---

## [Environment variable CIRCLE\_PR\_NUMBER does not work](https://discuss.circleci.com/t/environment-variable-circle-pr-number-does-not-work/28240)

<div class="topic-metadata">

**Author:** [@george-haddad](https://discuss.circleci.com/u/george-haddad)\
**Replies:** 8\
**Last updated:** [February 19, 2019, 3:45pm UTC](https://discuss.circleci.com/t/environment-variable-circle-pr-number-does-not-work/28240 "2019-02-19T15:45:30Z")

</div>

I read the docs at https://circleci.com/docs/2.0/env-vars/#setting-an-environment-variable-in-a-shell-command and I wanted to use the $CIRCLE\_PR\_NUMBER environment variable but it doesn’t seem to work. test-env: machin…

---

## [Using an Environment Variable inside of add\_ssh\_keys step](https://discuss.circleci.com/t/using-an-environment-variable-inside-of-add-ssh-keys-step/27302)

<div class="topic-metadata">

**Author:** [@hermant2](https://discuss.circleci.com/u/hermant2)\
**Replies:** 9\
**Last updated:** [February 12, 2019, 7:15pm UTC](https://discuss.circleci.com/t/using-an-environment-variable-inside-of-add-ssh-keys-step/27302 "2019-02-12T19:15:27Z")

</div>

I am attempting to store my github fingerprint as an Environment Variable in my project and use it inside of the add\_ssh\_keys command in circle.yml. - add\_ssh\_keys: fingerprints: $PROJ\_FINGERPRINT I would prefer …

---

## [BuildConfig type error](https://discuss.circleci.com/t/buildconfig-type-error/27218)

<div class="topic-metadata">

**Author:** [@CodeIsmail](https://discuss.circleci.com/u/CodeIsmail)\
**Replies:** 3\
**Last updated:** [February 11, 2019, 5:17pm UTC](https://discuss.circleci.com/t/buildconfig-type-error/27218 "2019-02-11T17:17:00Z")

</div>

Hi, I have an App Id That I saved in the Environment Variable of my project, I, however, encounter this error “:app:compileDebugJavaWithJavac/home/circleci/code/app/build/generated/source/buildConfig/debug/com/idealorb/h…

---

## [CIRCLE\_COMPARE\_URL is empty when running a workflow job](https://discuss.circleci.com/t/circle-compare-url-is-empty-when-running-a-workflow-job/25299)

<div class="topic-metadata">

**Author:** [@jfairley](https://discuss.circleci.com/u/jfairley)\
**Replies:** 7\
**Last updated:** [February 1, 2019, 10:53pm UTC](https://discuss.circleci.com/t/circle-compare-url-is-empty-when-running-a-workflow-job/25299 "2019-02-01T22:53:58Z")

</div>

I want to use CIRCLE\_COMPARE\_URL to analyze the commits for my build, but it seems to be empty when running workflow jobs. It does seem defined for single (non-workflow) jobs. Is this a not-yet-supported feature? Is the…

---

## [ENV type in orbs](https://discuss.circleci.com/t/env-type-in-orbs/27424)

<div class="topic-metadata">

**Author:** [@jaumann](https://discuss.circleci.com/u/jaumann)\
**Replies:** 3\
**Last updated:** [January 3, 2019, 5:24pm UTC](https://discuss.circleci.com/t/env-type-in-orbs/27424 "2019-01-03T17:24:38Z")

</div>

I came across an issue while attempting to use the orb iynere/compare-url@0.3.1(https://circleci.com/orbs/registry/orb/iynere/compare-url) that I was curious about the right way to fix. The orb uses a parameter circle-t…

---

## [Multiple CircleCI Projects for Single Repo](https://discuss.circleci.com/t/multiple-circleci-projects-for-single-repo/27109)

<div class="topic-metadata">

**Author:** [@galenweber](https://discuss.circleci.com/u/galenweber)\
**Replies:** 2\
**Last updated:** [December 13, 2018, 6:45pm UTC](https://discuss.circleci.com/t/multiple-circleci-projects-for-single-repo/27109 "2018-12-13T18:45:01Z")

</div>

I would like to different environment variables for different branches of my project. I do not want to set the environment variables in my circle.yml file or in a bash script, as that would violate the best practice of s…

[Next page](https://discuss.circleci.com/tag/envars/54.md?match_all_tags=true&page=1&tags%5B%5D=envars)
