简体   繁体   English

设置EB CLI - 错误非类型get_frozen_credentials

[英]Setting up the EB CLI - error nonetype get_frozen_credentials

Select a default region
1) us-east-1 : US East (N. Virginia)
2) us-west-1 : US West (N. California)
3) us-west-2 : US West (Oregon)
4) eu-west-1 : EU (Ireland)
5) eu-central-1 : EU (Frankfurt)
6) ap-southeast-1 : Asia Pacific (Singapore)
7) ap-southeast-2 : Asia Pacific (Sydney)
8) ap-northeast-1 : Asia Pacific (Tokyo)
9) ap-northeast-2 : Asia Pacific (Seoul)
10) sa-east-1 : South America (Sao Paulo)
11) cn-north-1 : China (Beijing)
(default is 3):5

When I choose a number or just leave it blank.. the following error appears: 当我选择一个数字或只是留空时出现以下错误:

ERROR: AttributeError :: 'NoneType' object has no attribute 'get_frozen_credentials' 错误:AttributeError ::'NoneType'对象没有属性'get_frozen_credentials'

after running eb init --debug: 在运行eb init之后--debug:

Traceback (most recent call last): File "/usr/local/bin/eb", line 11, in sys.exit(main()) File "/Library/Python/2.7/site-packages/ebcli/core/ebcore.py", line 149, in main app.run() File "/Library/Python/2.7/site-packages/cement/core/foundation.py", line 694, in run self.controller._dispatch() File "/Library/Python/2.7/site-packages/cement/core/controller.py", line 455, in _dispatch return func() File "/Library/Python/2.7/site-packages/cement/core/controller.py", line 461, in _dispatch return func() File "/Library/Python/2.7/site-packages/ebcli/core/abstractcontroller.py", line 57, in default self.do_command() File "/Library/Python/2.7/site-packages/ebcli/controllers/initialize.py", line 67, in do_command self.set_up_credentials() File "/Library/Python/2.7/site-packages/ebcli/controllers/initialize.py", line 152, in set_up_credentials if not initializeops.credentials_are_valid(): File "/Library/Python/2.7/site-packages/ebcli/operations/initializeops.py", line 24, in credentials_are_vali 回溯(最近调用最后一次):文件“/ usr / local / bin / eb”,第11行,在sys.exit(main())文件“/Library/Python/2.7/site-packages/ebcli/core/ebcore .py“,第149行,在主app.run()文件”/Library/Python/2.7/site-packages/cement/core/foundation.py“,第694行,运行self.controller._dispatch()文件” /Library/Python/2.7/site-packages/cement/core/controller.py“,第455行,在_dispatch中返回func()文件”/Library/Python/2.7/site-packages/cement/core/controller.py“ ,第461行,在_dispatch中返回func()文件“/Library/Python/2.7/site-packages/ebcli/core/abstractcontroller.py”,第57行,默认为self.do_command()文件“/Library/Python/2.7 /site-packages/ebcli/controllers/initialize.py“,第67行,在do_command self.set_up_credentials()文件”/Library/Python/2.7/site-packages/ebcli/controllers/initialize.py“,第152行,in set_up_credentials如果不是initializeops.credentials_are_valid():文件“/Library/Python/2.7/site-packages/ebcli/operations/initializeops.py”,第24行,在credentials_are_vali中 d elasticbeanstalk.get_available_solution_stacks() File "/Library/Python/2.7/site-packages/ebcli/lib/elasticbeanstalk.py", line 239, in get_available_solution_stacks result = _make_api_call('list_available_solution_stacks') File "/Library/Python/2.7/site-packages/ebcli/lib/elasticbeanstalk.py", line 37, in _make_api_call **operation_options) File "/Library/Python/2.7/site-packages/ebcli/lib/aws.py", line 207, in make_api_call response_data = operation(**operation_options) File "/Library/Python/2.7/site-packages/botocore/client.py", line 310, in _api_call return self._make_api_call(operation_name, kwargs) File "/Library/Python/2.7/site-packages/botocore/client.py", line 396, in _make_api_call operation_model, request_dict) File "/Library/Python/2.7/site-packages/botocore/endpoint.py", line 111, in make_request return self._send_request(request_dict, operation_model) File "/Library/Python/2.7/site-packages/botocore/endpoint.py", line 136, in _send_request request = self.create_request(re d elasticbeanstalk.get_available_solution_stacks()文件“/Library/Python/2.7/site-packages/ebcli/lib/elasticbeanstalk.py”,第239行,在get_available_solution_stacks中结果= _make_api_call('list_available_solution_stacks')文件“/Library/Python/2.7/ site-packages / ebcli / lib / elasticbeanstalk.py“,第37行,在_make_api_call ** operation_options中)文件”/Library/Python/2.7/site-packages/ebcli/lib/aws.py“,第207行,在make_api_call response_data中= operation(** operation_options)文件“/Library/Python/2.7/site-packages/botocore/client.py”,第310行,在_api_call中返回self._make_api_call(operation_name,kwargs)文件“/Library/Python/2.7/ site-packages / botocore / client.py“,第396行,在_make_api_call operation_model,request_dict中)文件”/Library/Python/2.7/site-packages/botocore/endpoint.py“,第111行,在make_request中返回self._send_request( request_dict,operation_model)文件“/Library/Python/2.7/site-packages/botocore/endpoint.py”,第136行,在_send_request request = self.create_request(re quest_dict, operation_model) File "/Library/Python/2.7/site-packages/botocore/endpoint.py", line 120, in create_request operation_name=operation_model.name) File "/Library/Python/2.7/site-packages/botocore/hooks.py", line 226, in emit return self._emit(event_name, kwargs) File "/Library/Python/2.7/site-packages/botocore/hooks.py", line 209, in _emit response = handler(**kwargs) File "/Library/Python/2.7/site-packages/botocore/signers.py", line 90, in handler return self.sign(operation_name, request) File "/Library/Python/2.7/site-packages/botocore/signers.py", line 123, in sign signature_version) File "/Library/Python/2.7/site-packages/botocore/signers.py", line 153, in get_auth_instance kwargs['credentials'] = self._credentials.get_frozen_credentials() AttributeError: 'NoneType' object has no attribute 'get_frozen_credentials' quest_dict,operation_model)文件“/Library/Python/2.7/site-packages/botocore/endpoint.py”,第120行,在create_request operation_name = operation_model.name)文件“/Library/Python/2.7/site-packages/botocore/ hooks.py“,第226行,在emit中返回self._emit(event_name,kwargs)文件”/Library/Python/2.7/site-packages/botocore/hooks.py“,第209行,在_emit response = handler(**) kwargs)文件“/Library/Python/2.7/site-packages/botocore/signers.py”,第90行,在处理程序中返回self.sign(operation_name,request)文件“/Library/Python/2.7/site-packages/botocore /signers.py“,第123行,签名signature_version)文件”/Library/Python/2.7/site-packages/botocore/signers.py“,第153行,in get_auth_instance kwargs ['credentials'] = self._credentials.get_frozen_credentials ()AttributeError:'NoneType'对象没有属性'get_frozen_credentials'

You got this error because you didn't initialize your AWS Access Key ID and AWS Secret Access Key you should install first awscli by runing pip install awscli . 您收到此错误是因为您没有初始化AWS Access Key IDAWS Secret Access Key您应该通过运行pip install awscli安装第一个pip install awscli

After you need to configure aws: aws configure 需要配置aws之后: aws configure

After this you can run eb init 在此之后,您可以运行eb init

Ran into this error as well. 也陷入这个错误。 Not sure of the root cause. 不确定根本原因。 But am still on Yosemite. 但我仍然在优胜美地。 When I tried AWS's install script curl -s https://s3.amazonaws.com/elasticbeanstalk-cli-resources/install-ebcli.py | python 当我尝试AWS的安装脚本curl -s https://s3.amazonaws.com/elasticbeanstalk-cli-resources/install-ebcli.py | python curl -s https://s3.amazonaws.com/elasticbeanstalk-cli-resources/install-ebcli.py | python It downloaded EB CLI 3.7.3 (Python 2.7.1). curl -s https://s3.amazonaws.com/elasticbeanstalk-cli-resources/install-ebcli.py | python它下载EB CLI 3.7.3(Python的2.7.1)。 A co-worker tried on his machine using homebrew and (since he hadn't run brew update in awhile) managed to get version 3.5.4 which worked perfectly. 一位同事尝试使用自制软件在他的机器上(因为他有一段时间没有运行brew更新)设法获得版本3.5.4,它完美地工作。

Looks like Amazon may have broken something in the updates for Yosemite users so rather than wait I just downloaded the working version and had no issues running eb init 看起来亚马逊可能已经破坏了Yosemite用户的更新,而不是等待我刚刚下载了工作版本并且没有运行eb init问题

Here's the steps I took: 这是我采取的步骤:

  1. Amazon created a symlink to version 3.7 in usr/local/bin called eb . 亚马逊在创建一个符号链接到3.7版本usr/local/bin称为eb Remove this link rm /usr/local/bin/eb 删除此链接rm /usr/local/bin/eb
  2. cd /usr/local/Library
  3. Use homebrew's brew log awsebcli to find the sha for the updated commit of version 3.5.4 (21e20f5). 使用自制软件的brew log awsebcli来查找版本3.5.4(21e20f5)的更新提交的sha。
  4. Run git checkout 21e20f5 /usr/local/Library/Formula/aws-elasticbeanstalk.rb 运行git checkout 21e20f5 /usr/local/Library/Formula/aws-elasticbeanstalk.rb
  5. Run brew install awsebcli and eb init should now run properly. 现在运行brew install awsebclieb init应该正常运行。

Hope that helps! 希望有所帮助!

Hey I facing the same problem, running eb for the first time on Arch Linux. 嘿,我遇到了同样的问题,在Arch Linux上第一次运行eb。

What worked for me was instead of simply using eb init 对我eb init不是简单地使用eb init

try a parameterized init, for example for interactive init 尝试参数化的init,例如用于交互式init

eb init -i

Reference: https://docs.aws.amazon.com/elasticbeanstalk/latest/dg/eb3-init.html 参考: https//docs.aws.amazon.com/elasticbeanstalk/latest/dg/eb3-init.html

Hope that helps :) 希望有帮助:)

I had the same problem. 我有同样的问题。

I installed aws-cli ( brew install awsebcli ) 我安装了aws-cli(brew install awsebcli)

Next, run "aws configure" and provide the correct details. 接下来,运行“aws configure”并提供正确的详细信息。

This solved my problem. 这解决了我的问题。

Was also had same issue but solved it some how. 也有同样的问题,但解决了一些如何。 As I was doing it for first time I prefer to follow step by step documentation but lead to above issue but solved by following simple steps 正如我第一次这样做,我更喜欢按照一步一步的文档,但导致上述问题,但通过以下简单步骤解决

$ mkdir HelloWorld
$ cd HelloWorld
$ eb init -p PHP
$ echo "Hello World" > index.html
$ eb create dev-env
$ eb open

In my case while following document steps I never asked for id/secret but with above commands it was possible. 在我的情况下,按照文档步骤我从来没有要求id / secret但是使用上面的命令它是可能的。

Hope it work for you! 希望它对你有用!

With credentials stored in ~/.aws/credentials and even after calling aws configure , I still had to use --profile profile_name with the command that was failing with the "no attribute 'get_frozen_credentials'" error. 使用凭证存储在~/.aws/credentials ,甚至在调用aws configure ,我仍然必须使用--profile profile_name和失败的命令以及“无属性'get_frozen_credentials'”错误。 This fixed it for me. 这为我修好了。

I had the same problem but none of the above helped me. 我有同样的问题,但上述都没有帮助我。 My problem was solved after creating an IAM user http://docs.aws.amazon.com/IAM/latest/UserGuide/id_users_create.html and generating new keys for it instead of using root and root keys and doing things the legacy way. 创建IAM用户http://docs.aws.amazon.com/IAM/latest/UserGuide/id_users_create.html并为其生成新密钥而不是使用root和root密钥并以传统方式执行操作后,我的问题得以解决。

声明:本站的技术帖子网页,遵循CC BY-SA 4.0协议,如果您需要转载,请注明本站网址或者原文地址。任何问题请咨询:yoyou2525@163.com.

 
粤ICP备18138465号  © 2020-2024 STACKOOM.COM