尝试在弹性 beanstalk 中添加盐和键作为环境变量(语法错误)

Trying to add salts & keys as environment variables in elastic beanstalk (syntax error)

我在将 wordpress 盐和键添加为弹性 beanstalk 中的环境变量时遇到了一些问题(语法错误)

-bash: 1{: command not found
-bash: 8!~+w: command not found
-bash: br}P9^: No such file or directory
-bash: =:JDKbbfk: command not found
-bash: /etc/profile.d/eb_envvars.sh: line 11: unexpected EOF while looking for matching ``'
-bash: /etc/profile.d/eb_envvars.sh: line 21: syntax error: unexpected end of file

生成密钥:https://api.wordpress.org/secret-key/1.1/salt/

摘要 - 使用字母数字盐和键。

我正在关注 guide here,它使用 YAML 格式的文件来定义 WordPress 的盐和密钥。创建新环境时,正确读取和加载环境变量。但是,当它尝试启动实例时,它会阻塞变量。我在查看实例日志中的消息文件时确认了这一点。

想知道我是否正确定义了 YAML 文件,但已经看到许多类似问题的报告。我认为 this question hits the nail on the head. So I replaced the keys and salts from the WordPress generator with ones from here.

我设置密码长度为64位,排除符号、包含数字、包含小写字符、包含大写字符、包含相似字符、排除歧义字符。它产生了这样的字符串:

S8TZaYb0dFL72A4ZwMKRxlUxmuwhq4UtLQhCCRR584SZ4XwIiQ0fIWu6WptauZ2V
b6wkMN2RtC0g67Wi2oHSYaDAZvyX2ECW98MiczoTHWKTxSK6s3bx9eLq9fkkqtKy

基本上只是字母数字字符串。使用这些实例后,实例开始正确启动,Elastic Beanstalk 很开心。

因此,无论该实例内部发生什么,都需要字母数字键和盐。其他字符可能无效。