【问题标题】:Google cloud - connect: connection refused with cloud build triggers谷歌云 - 连接:连接被云构建触发器拒绝
【发布时间】:2019-09-30 13:23:36
【问题描述】:

我正在尝试将应用程序从 GitHub 自动部署到 Google 云。作为参考,我检查了来自 - https://fireship.io/lessons/ci-cd-with-google-cloud-build/

的 firebase 的类似示例

但我在尝试运行触发器时遇到以下错误 -

Pulling image: grc.io/cloud-builders/npm
Using default tag: latest
Error response from daemon: Get https://grc.io/v2/: dial tcp 64.98.145.30:443: connect: connection refused
Using default tag: latest
Error response from daemon: Get https://grc.io/v2/: dial tcp 64.98.145.30:443: connect: connection refused
Using default tag: latest
Error response from daemon: Get https://grc.io/v2/: dial tcp 64.98.145.30:443: connect: connection refused
Using default tag: latest
Error response from daemon: Get https://grc.io/v2/: dial tcp 64.98.145.30:443: connect: connection refused
Using default tag: latest
Error response from daemon: Get https://grc.io/v2/: dial tcp 64.98.145.30:443: connect: connection refused
Using default tag: latest
Error response from daemon: Get https://grc.io/v2/: dial tcp 64.98.145.30:443: connect: connection refused
Using default tag: latest
Error response from daemon: Get https://grc.io/v2/: dial tcp 64.98.145.30:443: connect: connection refused
Using default tag: latest
Error response from daemon: Get https://grc.io/v2/: dial tcp 64.98.145.30:443: connect: connection refused
Using default tag: latest
Error response from daemon: Get https://grc.io/v2/: dial tcp 64.98.145.30:443: connect: connection refused
Using default tag: latest
Error response from daemon: Get https://grc.io/v2/: dial tcp 64.98.145.30:443: connect: connection refused
Using default tag: latest
Error response from daemon: Get https://grc.io/v2/: dial tcp 64.98.145.30:443: connect: connection refused

更新根据 Cloud Ace 评论我的 cloudbuild.yaml 文件有以下代码 -

steps:
  #install
  - name: 'gcr.io/cloud-builders/npm'
    args: ['install']

   #build
  - name: 'gcr.io/cloud-builders/npm'
    args: ['run', 'build']

   #deploy
  - name: 'gcr.io/mytest-240512/npm'
    args: ['deploy']

请帮我解决这个错误。谢谢!!

现在出现另一个错误 -

Step #1: ERROR: (gcloud.app.deploy) Permissions error fetching application [apps
/mytest-240512]. Please make sure you are using the correct project ID and that
you have permission to view applications on the project.

【问题讨论】:

    标签: google-cloud-platform google-cloud-build


    【解决方案1】:

    你的cloudbuild.yaml有错别字,把grc.io改成gcr.io

    【讨论】:

    • 非常感谢您的回复,对于愚蠢的错字感到抱歉,我已修复它,但现在又遇到另一个错误 - npm ERR!缺少脚本:构建 npm ERR!可以在以下位置找到此运行的完整日志:npm ERR! /builder/home/.npm/_logs/2019-05-14T03_59_11_566Z-debug.log
    • 你的 package.json 是什么样的?你在里面定义了脚本吗?
    • Package.json 看起来像 - docs.google.com/document/d/…
    • 您的 package.json 脚本部分中没有 build
    • 您能否告诉我它的外观或一些参考资料,我可以按照这些参考资料并将应用程序从 GitHub 自动部署到 Google 云?
    猜你喜欢
    • 2017-10-12
    • 2021-11-19
    • 2020-10-18
    • 1970-01-01
    • 1970-01-01
    • 2020-03-10
    • 1970-01-01
    • 1970-01-01
    • 2021-10-05
    相关资源
    最近更新 更多