# Encrypted env vars are not set

**URL:** <https://travis-ci.community/t/encrypted-env-vars-are-not-set/6204>\
**Category:** Deployment\
**Created:** [November 29, 2019, 3:39pm UTC](https://travis-ci.community/t/encrypted-env-vars-are-not-set/6204 "2019-11-29T15:39:00Z")\
**Posts on this page:** 4\
**Page:** 1

<div class="post-metadata">

**Author:** ![igagis](https://sea1.discourse-cdn.com/flex015/user_avatar/travis-ci.community/igagis/32/2810_2.png) [@igagis](https://travis-ci.community/u/igagis)\
**Post date:** [November 29, 2019, 3:39pm UTC](https://travis-ci.community/t/encrypted-env-vars-are-not-set/6204/1 "2019-11-29T15:39:00Z")

</div>

Today I started getting errors due to env variable not set for those vars which are encrypted.

Here is the build:  
[https://travis-ci.org/igagis/morda/jobs/618617766](https://travis-ci.org/igagis/morda/jobs/618617766)

about 20 days ago it worked ok:  
[https://travis-ci.org/igagis/morda/jobs/609735669](https://travis-ci.org/igagis/morda/jobs/609735669)

and there were no changes to the encrypted variables since then.

It looks like it only happens for that particular repo, my other repos work ok.

I tried re-encrypting the variables, but it did not help:  
[https://travis-ci.org/igagis/morda/jobs/618639494](https://travis-ci.org/igagis/morda/jobs/618639494)

---

<div class="post-metadata">

**Author:** ![J-Rocke](https://avatars.discourse-cdn.com/v4/letter/j/a87d85/32.png) [@J-Rocke](https://travis-ci.community/u/J-Rocke)\
**Post date:** [November 29, 2019, 4:12pm UTC](https://travis-ci.community/t/encrypted-env-vars-are-not-set/6204/2 "2019-11-29T16:12:07Z")

</div>

I did run into the same issues and contacted the support. They are working on a fix.

---

<div class="post-metadata">

**Author:** ![native-api](https://sea1.discourse-cdn.com/flex015/user_avatar/travis-ci.community/native-api/32/430_2.png) [@native-api](https://travis-ci.community/u/native-api)\
**Post date:** [December 2, 2019, 8:08pm UTC](https://travis-ci.community/t/encrypted-env-vars-are-not-set/6204/3 "2019-12-02T20:08:12Z")

</div>

This is probably connected to

> [@Travis encrypt "data too large" for PyPI tokens with older repos](https://travis-ci.community/t/travis-encrypt-data-too-large-for-pypi-tokens-with-older-repos/5792):
>
> [Travis CI docs](https://docs.travis-ci.com/user/deployment/pypi/) recommend encrypting the PyPI API token for deployment: travis encrypt your-api-token --add deploy.password However, this does not work with older repos. (I’ve only tested with .org repos.) Old repo xFor example, it doesn’t work for a repo whose .travis.yml was created (and therefore likely also enabled on [travis-ci.org](http://travis-ci.org)) on [2017-04-04](https://github.com/hugovk/osmviz/commit/04320f03d2b14d2f88cb3c6f80cdaad679ef0a77): $ ruby --version ruby 2.5.3p105 (2018-10-18 revision 65156) [x86\_64-darwin17] $ travis --version 1.8.10 $ travis encrypt "pypi-xxxxxxxxxxxx…

I suggested them to update keys on demand which would require no changes and minimal effort. But perhaps they decided to build some backward-compatible scheme instead…

---

<div class="post-metadata">

**Author:** ![igagis](https://sea1.discourse-cdn.com/flex015/user_avatar/travis-ci.community/igagis/32/2810_2.png) [@igagis](https://travis-ci.community/u/igagis)\
**Post date:** [December 2, 2019, 9:14pm UTC](https://travis-ci.community/t/encrypted-env-vars-are-not-set/6204/4 "2019-12-02T21:14:10Z")

</div>

I contacted support and they reverted the changes which lead to the problem. Now it works OK.
