22.9.1
11.1.0(稳定)
Mac OS 11.1
4.3.5
我将S3设置为private(),然后将以下内容放入更新脚本中:
.......
autoUpdater.on('checking-for-update', () => {
if (w !== undefined) {
w.get('settings').content().send('check-for-updates-begin');
}
let opts = {
service: 's3',
region: 'eu-central-1',
host: s3_bucket + '.s3.eu-central-1.amazonaws.com',
path: '/latest-mac.yml' // For example....
};
aws4.sign(opts, {
accessKeyId: "XXXXX",
secretAccessKey: "XXXXXXXX"
});
autoUpdater.requestHeaders = opts.headers;
});
........
不幸的是,然后我得到以下错误:Error: HttpError: 403 Forbidden
"<?xml version=\"1.0\" encoding=\"UTF-8\"?>\n<Error><Code>SignatureDoesNotMatch</Code><Message>The request signature we calculated does not match the signature you provided. Check your key and signing method.</Message>
.....
有人为我提供解决方案吗?
最佳答案
我的解决方案:
我将FeedUrl设置为autoUpdater autoUpdater.setFeedURL('https://[BUCKET].s3.[REGION].amazonaws.com');
关于amazon-s3 - 自动更新程序不适用于Amazon S3专用存储桶,我们在Stack Overflow上找到一个类似的问题: https://stackoverflow.com/questions/65914263/