在尝试将SBT项目导入IntelliJ IDEA 15 CE时,我遇到了这个奇怪的问题。
消息只是Unable to load AWS Credentials from any provider in the chain
。
我已经尝试将AWS_ACCESS_KEY_ID
和AWS_SECRET_ACCESS_KEY
暴露为我的会话的环境变量,我确信我设置的值是正确的。我也试过创建一个~/.aws/credentials
文件,但这些都没有做任何事情来解决这个错误。我认为这是一个IntelliJ错误,因为我可以使用sbt
在我的控制台中运行这个项目就好了。
这是我的sbt.last.log
的片段。这不是非常有用的。
[error] several problems occurred while resolving dependency: org.ow2#ow2;1.3 {}:
[error] Unable to load AWS credentials from any provider in the chain
[error] Unable to load AWS credentials from any provider in the chain
[error] Unable to load AWS credentials from any provider in the chain
[error] Unable to load AWS credentials from any provider in the chain
[error] Unable to load AWS credentials from any provider in the chain
[error]
[error] Unable to load AWS credentials from any provider in the chain
[error] Unable to load AWS credentials from any provider in the chain
[error]
[error] several problems occurred while resolving dependency: org.ow2.asm#asm-parent;4.1 {}:
[error] several problems occurred while resolving dependency: org.ow2#ow2;1.3 {}:
[error] Unable to load AWS credentials from any provider in the chain
[error] Unable to load AWS credentials from any provider in the chain
[error] Unable to load AWS credentials from any provider in the chain
[error] Unable to load AWS credentials from any provider in the chain
[error] Unable to load AWS credentials from any provider in the chain
[error]
[error] several problems occurred while resolving dependency: org.ow2#ow2;1.3 {}:
[error] Unable to load AWS credentials from any provider in the chain
[error] Unable to load AWS credentials from any provider in the chain
[error] Unable to load AWS credentials from any provider in the chain
[error] Unable to load AWS credentials from any provider in the chain
[error] Unable to load AWS credentials from any provider in the chain
[error]
[error] several problems occurred while resolving dependency: org.ow2#ow2;1.3 {}:
[error] Unable to load AWS credentials from any provider in the chain
[error] Unable to load AWS credentials from any provider in the chain
[error] Unable to load AWS credentials from any provider in the chain
[error] Unable to load AWS credentials from any provider in the chain
[error] Unable to load AWS credentials from any provider in the chain
[error]
[error] Unable to load AWS credentials from any provider in the chain
[error] Unable to load AWS credentials from any provider in the chain
[error]
[error] Unable to load AWS credentials from any provider in the chain
[error] Unable to load AWS credentials from any provider in the chain
[error] Total time: 596 s, completed Apr 5, 2016 10:59:14 AM
我该如何解决?
我能够使它工作的唯一方法是使用~/.aws/credential
文件(我使用的是最新的IntelliJ CE)。
在你的~/.aws/credential
里面添加:
[default]
aws_access_key_id={NO_QUOTES_KEY}
aws_secret_access_key={NO_QUOTES_SECRET_KEY}
[]
中的配置文件名称必须是默认的。它不适用于任何其他配置文件名称。
我最后跑了
sbt compile
或(激活器是SBT的超集)
activator compile
从命令行解决(并下载)所有依赖项,然后在IntelliJ中打开它。
希望对你也有用。