【发布时间】:2014-06-01 23:14:04
【问题描述】:
我正在尝试使用 aws node.js sdk 在 OPSWorks 中创建应用程序。
我的存储库位于 bitbucket,它是私有的。
我想用我的账户密码而不是 SSH 来使用 AWS api。
这是代码:
var appParams = {
Name: 'Demo app',
StackId: userData.Stacks.stackId,
Type: 'nodejs',
AppSource: {
Password: '*******',
Type: 'git',
Url: 'https://myUserName@bitbucket.org/myUserName/demofresh.git',
Username: 'myUserName'
}
}
opsworks.createApp(appParams, function(err, data) {
if (err)
callback(err);
else{
console.log(data);
callback(data);
}
});
由于某种原因,我在使用此应用程序运行实例时一直收到此错误。
错误:
---- Begin output of git ls-remote https://myUserName@bitbucket.org/myUserName/demofresh.git HEAD ----
STDOUT:
STDERR: fatal: could not read Password for 'https://myUserName@bitbucket.org': No such device or address
---- End output of git ls-remote https://myUserName@bitbucket.org/myUserName/demofresh.git HEAD ----
Ran git ls-remote https://myUserName@bitbucket.org/myUserName/demofresh.git HEAD returned 128
我也试过把网址改成:
Url: 'https://myUserName@bitbucket.org/myUserName/demofresh.git',
然后我得到一个错误,它没有用户名字段。
它无法读取我提供的密码。
我成功使用了 DescribeApps,只是为了确保密码和用户名保存在亚马逊服务器的应用程序中。
那么可能是 AWS API 有问题?
【问题讨论】:
标签: node.js amazon-web-services aws-opsworks