Issue with environment variables



CircleCI is doing one of two things:

  • It is adding white space at the beginning of the environment variable when I add it
  • Not updating the environment variable when I change it

My AWS deployment is failing due to the AWS_ACCESS_KEY_ID value has space as the first character.
I have removed it and re-added the variable several time through the admin UI and kicked off a new build. It still has space at the beginning of the variable.

When I SSH in and manually set it the value without space it works fine.

For the time being, I had to add this to remove the space:
AWS_ACCESS_KEY_ID="(echo -e "{AWS_ACCESS_KEY_ID}" | tr -d ‘[:space:]’)"

It is working for the time being.


Hello James,
The adding of a space I have seen often before in cases where you copy the password from a location where a ghost space is inserted, is that possible? As for the UI behaving a little strange, rather than refreshing the page (or using back/forward), try going into the address bar and hitting enter to “refresh” the page. Because our site is a React app this is sometimes necessary when the browser doesn’t catch certain updates.

Try echoing out a few test env vars and let us know if you see the extra spacing.


This topic was automatically closed 90 days after the last reply. New replies are no longer allowed.