[英]Escaping special characters in cli
I have been asked to escape special characters我被要求转义特殊字符
I have this env file我有这个环境文件
APP_AUTH_DOMAIN = blen.pp.com
APP_DATABASE_URL = https://bebaeio.com
APP_STORAGE_BUCKET = blepot.com
APP_ID = 1:2806911447cdcd63f5564ad
MEASUREMENT_ID = G-0W
Here .
在这里
.
-
, :
and /
should be special characters? -
, :
和/
应该是特殊字符吗? The escape for them would be他们的逃避是
APP_AUTH_DOMAIN = blen/./pp/./com
APP_DATABASE_URL = https://bebaeio/./com
APP_STORAGE_BUCKET = blepot/./com
APP_ID = 1/:/2806911447cdcd63f5564ad
MEASUREMENT_ID = G/-/0W
Is the above correct?以上是正确的吗? also what would be the escape character for
https://bebaeio.com
还有什么是
https://bebaeio.com
的转义字符
Ps: this the error I got Ps:这是我得到的错误
We were unable to parse one of your secure environment variables.
我们无法解析您的安全环境变量之一。 Please make sure to escape special characters such as ' ' (white space) and $ (dollar symbol) with \ (backslash).
请确保使用 \(反斜杠)转义特殊字符,例如 ' '(空格)和 $(美元符号)。 For example, thi$isanexample would be typed as thi\$isanexample.
例如,thi$isanexample 将被键入为 thi\$isanexample。 See https://docs.travis-ci.com/user/encryption-keys .
请参阅https://docs.travis-ci.com/user/encryption-keys 。
According to your error message, you need to use a \ (backslash) not / (forward slash) for escaping.根据您的错误消息,您需要对 escaping 使用 \(反斜杠)而不是 /(正斜杠)。
APP_AUTH_DOMAIN = blen\.pp\.com
APP_DATABASE_URL = https\:\/\/bebaeio.com
APP_STORAGE_BUCKET = blepot\.com
APP_ID = 1\:2806911447cdcd63f5564ad
MEASUREMENT_ID = G\-0W
These are bash environment variables.这些是 bash 环境变量。 You can either escape special characters or quote the whole value.
您可以转义特殊字符或引用整个值。 The latter is usually easier.
后者通常更容易。 Also for assignment , don't put whitespace around
=
.同样对于assignment ,不要在
=
周围放置空格。
This should work:这应该有效:
APP_AUTH_DOMAIN="blen.pp.com"
APP_DATABASE_URL="https://bebaeio.com"
APP_STORAGE_BUCKET="blepot.com"
APP_ID="1:2806911447cdcd63f5564ad"
MEASUREMENT_ID="G-0W"
声明:本站的技术帖子网页,遵循CC BY-SA 4.0协议,如果您需要转载,请注明本站网址或者原文地址。任何问题请咨询:yoyou2525@163.com.