- html - 出于某种原因,IE8 对我的 Sass 文件中继承的 html5 CSS 不友好?
- JMeter 在响应断言中使用 span 标签的问题
- html - 在 :hover and :active? 上具有不同效果的 CSS 动画
- html - 相对于居中的 html 内容固定的 CSS 重复背景?
我正在尝试使用 Electron 更新器和 AWS S3 存储桶实现我的 Electron react 应用程序的自动更新。但出现错误:
⨯ NoCredentialProviders: no valid providers in chain. Deprecated.
For verbose messaging see aws.Config.CredentialsChainVerboseErrors
github.com/develar/app-builder/pkg/publisher.upload
Y:/Documents/app-builder/pkg/publisher/s3.go:169
github.com/develar/app-builder/pkg/publisher.ConfigurePublishToS3Command.func1
Y:/Documents/app-builder/pkg/publisher/s3.go:57
github.com/alecthomas/kingpin.(*actionMixin).applyActions
C:/Users/develar/go/pkg/mod/github.com/alecthomas/kingpin@v2.2.6+incompatible/actions.go:28
github.com/alecthomas/kingpin.(*Application).applyActions
C:/Users/develar/go/pkg/mod/github.com/alecthomas/kingpin@v2.2.6+incompatible/app.go:557
github.com/alecthomas/kingpin.(*Application).execute
C:/Users/develar/go/pkg/mod/github.com/alecthomas/kingpin@v2.2.6+incompatible/app.go:390
github.com/alecthomas/kingpin.(*Application).Parse
C:/Users/develar/go/pkg/mod/github.com/alecthomas/kingpin@v2.2.6+incompatible/app.go:222
main.main
Y:/Documents/app-builder/main.go:90
runtime.main
c:/go/src/runtime/proc.go:203
runtime.goexit
c:/go/src/runtime/asm_amd64.s:1373
⨯ NoCredentialProviders: no valid providers in chain. Deprecated.
For verbose messaging see aws.Config.CredentialsChainVerboseErrors
github.com/develar/app-builder/pkg/publisher.upload
Y:/Documents/app-builder/pkg/publisher/s3.go:169
github.com/develar/app-builder/pkg/publisher.ConfigurePublishToS3Command.func1
Y:/Documents/app-builder/pkg/publisher/s3.go:57
github.com/alecthomas/kingpin.(*actionMixin).applyActions
C:/Users/develar/go/pkg/mod/github.com/alecthomas/kingpin@v2.2.6+incompatible/actions.go:28
github.com/alecthomas/kingpin.(*Application).applyActions
C:/Users/develar/go/pkg/mod/github.com/alecthomas/kingpin@v2.2.6+incompatible/app.go:557
github.com/alecthomas/kingpin.(*Application).execute
C:/Users/develar/go/pkg/mod/github.com/alecthomas/kingpin@v2.2.6+incompatible/app.go:390
github.com/alecthomas/kingpin.(*Application).Parse
C:/Users/develar/go/pkg/mod/github.com/alecthomas/kingpin@v2.2.6+incompatible/app.go:222
main.main
Y:/Documents/app-builder/main.go:90
runtime.main
c:/go/src/runtime/proc.go:203
runtime.goexit
c:/go/src/runtime/asm_amd64.s:1373
⨯ Cannot cleanup:
Error #1 --------------------------------------------------------------------------------
Error: D:\directoryofmyapp\myappname\node_modules\app-builder-bin\win\x64\app-builder.exe exited with code ERR_ELECTRON_BUILDER_CANNOT_EXECUTE
at ChildProcess.<anonymous> (D:\directoryofmyapp\myappname\node_modules\builder-util\src\util.ts:243:14)
at Object.onceWrapper (events.js:422:26)
at ChildProcess.emit (events.js:315:20)
at maybeClose (internal/child_process.js:1048:16)
at Process.ChildProcess._handle.onexit (internal/child_process.js:288:5)
Error #2 --------------------------------------------------------------------------------
Error: D:\directoryofmyapp\myappname\node_modules\app-builder-bin\win\x64\app-builder.exe exited with code ERR_ELECTRON_BUILDER_CANNOT_EXECUTE
at ChildProcess.<anonymous> (D:\directoryofmyapp\myappname\node_modules\builder-util\src\util.ts:243:14)
at Object.onceWrapper (events.js:422:26)
at ChildProcess.emit (events.js:315:20)
at maybeClose (internal/child_process.js:1048:16)
at Process.ChildProcess._handle.onexit (internal/child_process.js:288:5) stackTrace=
这是我的 package.json:
{
"name": "myappname",
"version": "0.1.0",
"private": true,
"license": "MIT",
"productName": "myappname",
"author": "Bakhrom",
"description": "myappname",
"homepage": "./",
"main": "./public/electron.js",
"build": {
"appId": "com.myappname.electron-app",
"files": [
"build/electron.js",
"build/.env",
"./~/.aws/credentials",
"~/.aws/credentials",
"./.env",
".env"
],
"directories": {
"buildResources": "./public/**/*"
},
"win": {
"icon": "./public/img/favicon.png"
},
"publish": {
"provider": "s3",
"bucket": "mybucketname",
"region": "ap-southeast-1"
}
},
"dependencies": {
"@fluentui/react": "^7.146.0",
"@testing-library/jest-dom": "^4.2.4",
"@testing-library/react": "^9.3.2",
"@testing-library/user-event": "^7.1.2"
"electron-is-dev": "^1.2.0",
"electron-pos-printer": "^1.2.0",
"electron-updater": "^4.3.5",
... other packages
},
"scripts": {
"start": "react-scripts start",
"build": "node --expose-gc --max-old-space-size=1900 node_modules/react-scripts/scripts/build.js",
"test": "react-scripts test",
"dev": "concurrently \"npm start\" \"wait-on http://localhost:3000 && electron .\"",
"electron-build": "npm run build && electron-builder build",
"deploy": "npm run build && electron-builder build --win --publish always",
"postinstall": "electron-builder install-app-deps"
},
"eslintConfig": {
"extends": "react-app"
},
"browserslist": {
"production": [
">0.2%",
"not dead",
"not op_mini all"
],
"development": [
"last 1 chrome version",
"last 1 firefox version",
"last 1 safari version"
]
},
"devDependencies": {
"concurrently": "^5.3.0",
"dotenv": "^8.2.0",
"electron": "^9.1.0",
"electron-builder": "^22.9.1",
"electron-rebuild": "^2.3.2",
"wait-on": "^5.2.1"
}
}
我正在运行以下命令:
"deploy": "npm run build && electron-builder build --win --publish always"
存储桶是公开的。我不知道发生了什么事?我还在环境变量和 ~/.aws/credentials 文件中提到了 aws_access_key_id 和 aws_secret_access_key。但没有结果。
最佳答案
根据官方文档,你需要有这样的东西
S3Options
AWS credentials are required, please see getting your credentials. Define
AWS_ACCESS_KEY_ID
andAWS_SECRET_ACCESS_KEY
environment variables. Or in the~/.aws/credentials
.
"build":
"publish": {
"provider": "s3",
"bucket": "bucket-name"
}
}
}
您将 secret 导出到 Windows 环境中:
setx AWS_ACCESS_KEY_ID AKIAIOSFODNN7EXAMPLE
setx AWS_SECRET_ACCESS_KEY wJalrXUtnFEMI/K7MDENG/bPxRfiCYEXAMPLEKEY
setx AWS_DEFAULT_REGION us-west-2
你不必做水桶
Public
除非你要。确保
User's
您正在使用的凭据,至少具有以下访问存储桶的权限:
{
"Version": "2012-10-17",
"Statement": [
{
"Sid": "VisualEditor0",
"Effect": "Allow",
"Action": [
"s3:AbortMultipartUpload",
"s3:GetObject",
"s3:GetObjectAcl",
"s3:GetObjectVersion",
"s3:ListMultipartUploadParts",
"s3:PutObject",
"s3:PutObjectAcl"
],
"Resource": "arn:aws:s3:::bucketName/*"
},
{
"Sid": "VisualEditor1",
"Effect": "Allow",
"Action": [
"s3:ListBucket",
"s3:ListBucketMultipartUploads",
"s3:GetBucketLocation"
],
"Resource": "arn:aws:s3:::bucketName"
}
]
}
附注为什么要捆绑凭据文件
"./~/.aws/credentials",
"~/.aws/credentials",
关于amazon-web-services - NoCredentialProviders : no valid providers in chain error in electron-updater with AWS S3,我们在Stack Overflow上找到一个类似的问题: https://stackoverflow.com/questions/66045421/
当我尝试输入时,我正在关注 Ray Wenderlich ( https://videos.raywenderlich.com/screencasts/545-server-side-swift-wi
我正在使用 javax.validation.Validation 来验证 jpa 实体。我总是针对相同的实体进行验证。 我想知道是对所有验证使用一个 validator 更好,还是每次验证时实例化一
Controller : @RequestMapping(...) public void foo(@Valid Parent p){ } class Parent { @NotNull // j
在 login.phtml 中,validator 和 validate 之间有什么区别 - 有人可以解释下面每一行的含义 function onepageLogin(button)
我有一个 java bean 用于将 JSON 消息发送到 spring @RestController 并且我有 bean 验证设置并使用 @Valid 运行得很好。但我想转移到 Protobuf/
我正在使用 vee-validate 来验证注册表单,我编写了如下代码,
使用 有什么区别属性和 标签? 我应该什么时候使用哪一种? 最佳答案 validator属性允许您引用独立的托管 bean 方法,而不仅仅是像这样的验证器
我们有这个 Alamofire 错误处理: Alamofire.request(.GET, getUrl("mystuff")).responseData { response in guar
以下代码创建了两个单选按钮。每个选项都包含一个日期值,该日期值已成功转换为格式为“yyyy-MM-dd”的标签。一旦我做出选择并单击下一步按钮,我就会收到以下错误“j_idt12:comDateCho
是否有类似的验证: req.checkBody('property', 'should be present').isPresent(); 值本身并不重要。 现在我使用这个解决方案: .isLengt
系列文章: 1、async-validator 源码学习(一):文档翻译 2、async-validator 源码学习笔记(二):目录结构 3、async-validator 源码学习笔记(三):ru
我正在使用 Backbone.Validation插入。我有一个模型可以在服务器端进行唯一性检查。我如何让 backbone.validation 识别错误并运行我设置的回调以显示返回的错误消息? t
我有一个 Knockout.Validation 场景,我认为该场景相当普遍,但尚未通过在网络上搜索和本网站上的各种答案找到解决方案。 我正在验证的属性在 ajax 调用之后才会添加到可观察到的 kn
我是 Knockout JS 的新手。我需要一个验证器来验证用户将在文本框中输入的日期。为此编写了如下代码 ko.validation.rules['date'] = { validator:
如何在 JSF 验证器中比较两个字符串是否相等? if (!settingsBean.getNewPassword().equals(settingsBean.getConfirmPassword()
我有简单的域: package app class Customers { String CUSTOMER String NOTE static mapping = {
我正在使用 ember-validations 来验证表单中的模型。 如果我使用 createRecord 创建记录,则模型的实例已经过验证,因此在用户输入值之前表单已经显示验证错误。 我只想在提交表
我有两种不同的服务:第一个是将对象保存到数据库,第二个是更新现有对象。 我正在对我的对象使用验证约束,例如(@NotBlank、@Size、@Pattern 等),在第一种情况下,我需要验证对象的所有
我有 2 个 ensure - 验证装饰器用于 2 个字段:password 和 retypePassword。我想在填写 retypePassword 字段时检查这两个字段是否相等。 问题是,当我在
I'm aware that it's a bug ,但是在域类上调用 validate() 会覆盖之前放入的任何拒绝: def save = { def assignment = new A
我是一名优秀的程序员,十分优秀!