You can encrypt Travis variables with the tool travis.
You will encrypt your variable with travis encrypt FOO=<your passowrd/sensitive data here>. This will print something like:secure: "djfhfjriwjdncml2948328$+@jdjw"
You can then use this variable in your envoirmental variables or elsewhere.
For example, if you copy this variable to an environment section, you can safely save your environment variable.
env:
- secure: "djfhfjriwjdncml2948328$+@jdjw"
FOO . ,