谷歌云 - 连接:连接被云构建触发器拒绝
Posted
技术标签:
【中文标题】谷歌云 - 连接:连接被云构建触发器拒绝【英文标题】: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.
【问题讨论】:
【参考方案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 云?以上是关于谷歌云 - 连接:连接被云构建触发器拒绝的主要内容,如果未能解决你的问题,请参考以下文章