AWS eb init不是有效的键=值对(缺少等号) [英] AWS eb init not a valid key=value pair (missing equal-sign)

查看:114
本文介绍了AWS eb init不是有效的键=值对(缺少等号)的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!

问题描述

我试图建立一个基本的Rails应用程序并将其部署到Elastic Beanstalk.我运行eb init,选择了我的区域,并要求输入(aws-access-id):(aws-secret-key):.出于某种原因,它不接受我的凭据,并且在某一时刻没有意识到它,我无意中在(aws-access-id)中运行了命令 eb --version :行.现在,我无法选择自己的地区.我得到

I was trying to set up a basic rails app and deploy it to Elastic Beanstalk. I ran eb init, picked my region and it asked for (aws-access-id): and (aws-secret-key):. For what ever reason it wasn't accepting my credentials and without realizing it at one point I had accidentally ran a command eb --version in the (aws-access-id): line. Now I can't get past choosing my region. I get

<代码>错误:ServiceError-'--version/20190924/us-west-2/elasticbeanstalk/aws4_request'不是授权标头中的有效键=值对(缺少等号):'AWS4-HMAC-SHA256凭据= eb --version/20190924/us-west-2/elasticbeanstalk/aws4_request,SignedHeaders = content-type; host; x-amz-content-sha256; x-amz-date,Signature = afc27125738fef1062fc8565e130ced6e0f7b2c343c2e28456d7693.

ERROR: ServiceError - '--version/20190924/us-west-2/elasticbeanstalk/aws4_request' not a valid key=value pair (missing equal-sign) in Authorization header: 'AWS4-HMAC-SHA256 Credential=eb --version/20190924/us-west-2/elasticbeanstalk/aws4_request, SignedHeaders=content-type;host;x-amz-content-sha256;x-amz-date, Signature=afc27125738fef1062fc8565e130ced6e0f7b2c343c2e28456d7693c8f396c92'.

我无数小时以来一直在寻找解决方案,但找不到任何东西.我试着删除.elasticbeanstalk文件(有人提到过),将其完全卸载,aws configure并放入适当的凭据,之后还有其他stackoverflow问题.似乎没有任何效果,错误也不会消失.尝试查找如何重置标题.不知道为什么要先保存它.我觉得它应该给了我错误的凭据(如果有的话).

I have been looking for a solution for countless hours now and can't find anything. I tried deleting .elasticbeanstalk file(some had mentioned), uninstalling it altogether, aws configure and put in the proper credentials, followed other stackoverflow questions. Nothing seems to work and the error will not go away. Tried looking up how to reset the headers. Not sure why this was saved in the first place. I feel it should have just given me wrong credentials if anything.

WS eb初始化缺少等号错误

我在Mac上.

推荐答案

好吧,终于有了答案,这要归功于我的问题与另一个类似的堆栈溢出问题的链接.我所做的工作是cd到根目录,最后我在其中进行了 $ ls -a 来查看隐藏的文件并看到了 .aws .我 $ cd .aws ,然后运行 $ open config .它打开了

Okay, finally figured it out thanks to the link in my question to another similar stack overflow question. What I did was cd to my root directory where I finally did $ ls -a to see hidden files and saw .aws. I $ cd .aws and then ran $ open config. It open this

aws_access_key_id = eb --version
aws_secret_access_key = ENTER_SECRET_HERE

[default]
output = json
region = 3

更改了key_id和access_key并成功了!希望它能在发疯之前帮助别人.

Changed the key_id and access_key and it worked! Hope it helps out someone else before going insane.

这篇关于AWS eb init不是有效的键=值对(缺少等号)的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!

查看全文
登录 关闭
扫码关注1秒登录
发送“验证码”获取 | 15天全站免登陆