我正在尝试使用 aws node.js sdk 在 OPSWorks 中创建应用程序。
我的存储库位于 bitbucket,它是私有的。
我想将 AWS api 与我的帐户密码一起使用,而不是 SSH。
这是代码:
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可能有问题吗?