0

我想在 App Engine 上部署 Verdaccio,并在 Google 云上进行存储。

我设法在 App Engine 上启动了应用程序,但我遇到了有关数据存储访问的错误。我不知道如何解决它,文档也不清楚。

你能帮我吗?

登录我的本地计算机:

./node_modules/.bin/verdaccio --config ./config.yaml

 warn --- config file  - /home/workspace/verdaccio/config.yaml
 warn --- Using credentials in a file might be un-secure and is only recommended for local development
 warn --- Google storage settings: {"projectId":"myproject","keyFilename":"./keyFile.json"}
 warn --- Plugin successfully loaded: verdaccio-google-cloud
 warn --- gcloud: [datastore getSecret] init error InternalServerError: 7 PERMISSION_DENIED: Missing or insufficient permissions.

fatal--- uncaught exception, please report this
ServiceUnavailableError: [getSecret] permissions error

用户是 Cloud Datastore 的所有者和存储桶的管理员(抱歉是法语):

  • 库存物品管理人员
  • Créateur des objets de l'espace de stockage
  • 编辑 Pub/Sub
  • BigQuery 讲师
  • 讲师秘密经理
  • 专有云数据存储
  • 整体应用 BigQuery

登录 GCP: 在此处输入图像描述

—————————————————————————————————————————— 这是我的文件:config.yaml (配置 Verdaccio)

store:
  google-cloud:
   projectId: <Google Project ID>
   kind: npm1234
   bucket: verdaccio-bucket
   resumable: true
   keyFilename: ./userKey.json
uplinks:
  npmjs:
    url: https://registry.npmjs.org/
packages:
  "@myRepository/*":
    access: $authenticated
    publish: $authenticated
  "**":
    access: $authenticated
    publish: $authenticated
    proxy: npmjs
logs: { type: stdout, format: pretty, level: http }
auth:
  htpasswd:
    file: ./htpasswd
    max_users: -1
    algorithm: bcrypt
web:
  enable: false
  title: Verdaccio-UI
  darkMode: true
  scope: "@myRepository/*"
i18n:
  web: fr-FR

包.json:

...
  "scripts": {
    "deploy": "gcloud app deploy app.yaml",
    "start": "./node_modules/.bin/verdaccio --config ./config.yaml --listen $PORT"
  },
  "dependencies": {
    "verdaccio": "^5.2.2",
    "verdaccio-google-cloud": "^10.0.2",
    "verdaccio-htpasswd": "^10.0.1"
  }
...
4

1 回答 1

1

我发现了这个问题。在datastore我没有实体。我创建了一个,它现在正在工作。插件文档不清楚如何从datastore:( 开始。

于 2021-12-03T10:49:31.820 回答