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

标签 linux amazon-web-services syntax-error environment-variables amazon-elastic-beanstalk

我在将 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

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

enter image description here

最佳答案

总结 - 使用字母数字盐和键。

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

想知道我是否正确定义了 YAML 文件,但已经看到许多类似问题的报告。我想this question一语中的。所以我用 from here 替换了 WordPress 生成器中的键和盐。 .

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

S8TZaYb0dFL72A4ZwMKRxlUxmuwhq4UtLQhCCRR584SZ4XwIiQ0fIWu6WptauZ2V
b6wkMN2RtC0g67Wi2oHSYaDAZvyX2ECW98MiczoTHWKTxSK6s3bx9eLq9fkkqtKy

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

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

关于linux - 尝试在弹性 beanstalk 中添加盐和键作为环境变量(语法错误),我们在Stack Overflow上找到一个类似的问题: https://stackoverflow.com/questions/35601397/

相关文章:

android - 如何显示来自AWS S3的图像而不下载到本地存储

python - 为什么我的pydoc命令会检索exception.syntaxerror?

Javascript非法 token 错误

regex - Lex : Breaking up long regular expressions over multiple lines

linux - pull 入 git 存储库时权限被拒绝

c - 串口编程为什么要用fcntl(fd, F_SETFL, 0)

python - 如何在不编写代码的情况下在 amazon sqs 中实现指数退避

c - C 中的 tcgetpgrp 函数

php - 使用 Telegram Bot 运行根脚本

amazon-web-services - 401 的自定义响应 Lambda 授权器