当前位置: 首页 > 面试题库 >

错误:(gcloud.app.deploy)INVALID_ARGUMENT:无法解析源

闻人栋
2023-03-14
问题内容

我正在尝试部署一个go 1.11曾经可以运行的运行时,但是最近我遇到了:ERROR: (gcloud.app.deploy) INVALID_ARGUMENT: unable to resolve source错误。

我的内容什么都没有app.yaml改变,并且错误消息也无法帮助您理解问题所在。我与运行它--verbosity=debug flag并得到:

Building and pushing image for service [apiv1]
DEBUG: Could not call git with args ('config', '--get-regexp', 'remote\\.(.*)\\.url'): Command '['git', 'config', '--get-regexp', 'remote\\.(.*)\\.url']' returned non-zero exit status 1
INFO: Could not generate [source-context.json]: Could not list remote URLs from source directory: /var/folders/18/k3w6w7f169xg4mypdwj7p4_c0000gn/T/tmp6IkZKx/tmphibUAo
Stackdriver Debugger may not be configured or enabled on this application. See https://cloud.google.com/debugger/ for more information.
INFO: Uploading [/var/folders/18/k3w6w7f169xg4mypdwj7p4_c0000gn/T/tmpVHKXol/src.tgz] to [staging.wildfire-app-backend.appspot.com/asia.gcr.io/wildfire-app-backend/appengine/apiv1.20190506t090359:latest]
DEBUG: Using runtime builder root [gs://runtime-builders/]
DEBUG: Loading runtimes manifest from [gs://runtime-builders/runtimes.yaml]
INFO: Reading [<googlecloudsdk.api_lib.storage.storage_util.ObjectReference object at 0x105ca9b10>]
DEBUG: Resolved runtime [go1.11] as build configuration [gs://runtime-builders/go-1.11-builder-20181217154124.yaml]
INFO: Using runtime builder [gs://runtime-builders/go-1.11-builder-20181217154124.yaml]
INFO: Reading [<googlecloudsdk.api_lib.storage.storage_util.ObjectReference object at 0x105b03b50>]
DEBUG: (gcloud.app.deploy) INVALID_ARGUMENT: unable to resolve source
Traceback (most recent call last):
  File "/usr/local/Caskroom/google-cloud-sdk/latest/google-cloud-sdk/lib/googlecloudsdk/calliope/cli.py", line 985, in Execute
    resources = calliope_command.Run(cli=self, args=args)
  File "/usr/local/Caskroom/google-cloud-sdk/latest/google-cloud-sdk/lib/googlecloudsdk/calliope/backend.py", line 795, in Run
    resources = command_instance.Run(args)
  File "/usr/local/Caskroom/google-cloud-sdk/latest/google-cloud-sdk/lib/surface/app/deploy.py", line 90, in Run
    parallel_build=False)
  File "/usr/local/Caskroom/google-cloud-sdk/latest/google-cloud-sdk/lib/googlecloudsdk/command_lib/app/deploy_util.py", line 636, in RunDeploy
    flex_image_build_option=flex_image_build_option)
  File "/usr/local/Caskroom/google-cloud-sdk/latest/google-cloud-sdk/lib/googlecloudsdk/command_lib/app/deploy_util.py", line 411, in Deploy
    image, code_bucket_ref, gcr_domain, flex_image_build_option)
  File "/usr/local/Caskroom/google-cloud-sdk/latest/google-cloud-sdk/lib/googlecloudsdk/command_lib/app/deploy_util.py", line 287, in _PossiblyBuildAndPush
    self.deploy_options.parallel_build)
  File "/usr/local/Caskroom/google-cloud-sdk/latest/google-cloud-sdk/lib/googlecloudsdk/api_lib/app/deploy_command_util.py", line 450, in BuildAndPushDockerImage
    return _SubmitBuild(build, image, project, parallel_build)
  File "/usr/local/Caskroom/google-cloud-sdk/latest/google-cloud-sdk/lib/googlecloudsdk/api_lib/app/deploy_command_util.py", line 483, in _SubmitBuild
    build, project=project)
  File "/usr/local/Caskroom/google-cloud-sdk/latest/google-cloud-sdk/lib/googlecloudsdk/api_lib/cloudbuild/build.py", line 149, in ExecuteCloudBuild
    build_op = self.ExecuteCloudBuildAsync(build, project)
  File "/usr/local/Caskroom/google-cloud-sdk/latest/google-cloud-sdk/lib/googlecloudsdk/api_lib/cloudbuild/build.py", line 133, in ExecuteCloudBuildAsync
    build=build,))
  File "/usr/local/Caskroom/google-cloud-sdk/latest/google-cloud-sdk/lib/googlecloudsdk/third_party/apis/cloudbuild/v1/cloudbuild_v1_client.py", line 205, in Create
    config, request, global_params=global_params)
  File "/usr/local/Caskroom/google-cloud-sdk/latest/google-cloud-sdk/lib/third_party/apitools/base/py/base_api.py", line 731, in _RunMethod
    return self.ProcessHttpResponse(method_config, http_response, request)
  File "/usr/local/Caskroom/google-cloud-sdk/latest/google-cloud-sdk/lib/third_party/apitools/base/py/base_api.py", line 737, in ProcessHttpResponse
    self.__ProcessHttpResponse(method_config, http_response, request))
  File "/usr/local/Caskroom/google-cloud-sdk/latest/google-cloud-sdk/lib/third_party/apitools/base/py/base_api.py", line 604, in __ProcessHttpResponse
    http_response, method_config=method_config, request=request)
HttpBadRequestError: HttpError accessing <https://cloudbuild.googleapis.com/v1/projects/wildfire-app-backend/builds?alt=json>: response: <{'status': '400', 'content-length': '114', 'x-xss-protection': '0'
, 'x-content-type-options': 'nosniff', 'transfer-encoding': 'chunked', 'vary': 'Origin, X-Origin, Referer', 'server': 'ESF', '-content-encoding': 'gzip', 'cache-control': 'private', 'date': 'Mon, 06 May 2
019 16:04:41 GMT', 'x-frame-options': 'SAMEORIGIN', 'alt-svc': 'quic=":443"; ma=2592000; v="46,44,43,39"', 'content-type': 'application/json; charset=UTF-8'}>, content <{
  "error": {
    "code": 400,
    "message": "unable to resolve source",
    "status": "INVALID_ARGUMENT"
  }
}
>
ERROR: (gcloud.app.deploy) INVALID_ARGUMENT: unable to resolve

任何建议都是有用的,我也尝试过gcloud beta,我轮换了凭据,没有用。我的用户具有Owner角色,但我单独添加了所有可能需要的角色

App Engine Admin
App Engine Code Viewer
App Engine Deployer
App Engine Service Admin
Project Billing Manager
Cloud Build Service Account
Cloud Build Editor
Cloud Build Viewer
Owner
Storage Admin

问题答案:

尝试在项目中禁用和启用Cloud Build API,以便创建一个新的服务帐户,然后尝试再次进行部署。

这样可以确保Cloud Build有权启动构建(服务帐户名称应类似于project-
number@cloudbuild.gserviceaccount.com)。



 类似资料:
  • 我试图使用Jenkins构建一个maven项目,结果出现了以下错误,整个构建失败了。Maven成功地从GIT中提取代码并进行处理。但POM误差无法纠正。请帮帮我.

  • 同步项目在开始时失败,我无法修复它。错误是gradle无法解析此依赖项。 知道怎么修好它吗?

  • 我对Android的Gradle构建有问题。我尝试了很多方法来解决这个问题,但没有什么不起作用。我需要帮助。 Gradle版本:4.4 Gradle插件:3.0.1 错误:无法解析app@serverDebug /compileClasspath的依赖关系:无法解析项目:vksdk_library。 错误:无法解析“”的依存关系:app@mockDebugAndroidTest/compileCl

  • 问题内容: 我正在尝试从标准Oracle Java教程 运行此练习脚本。 这似乎是一个常见错误,我已经使用SO资源来尝试解决此问题。我已经尝试过清理项目,刷新项目,切换工作场所并切换回去,删除并重新添加了JRE7。 我不知道该怎么办 问题答案: 根据Javadoc, 因此,升级到Java 8,或尝试查找本教程的旧版本。 我是新来的。你怎么能知道你正在跑步?我正在使用Eclipse 要确定您当前的e

  • 我的Android Studio不断给出错误,无法解析符号R。它是Android目录中名为R.java的文件。我已将此文件安全地保存在目录中。但它仍然显示出错误。在互联网上搜索到这个错误后,人们建议我重新构建/清理/升级项目同步/重新启动Android Studio和其他方法。我什么都做了。但问题仍然存在!怎么办??

  • 我试图在我的Android项目中设置一个RecycerView,但是我不能引用我的列表,因为使用代码“RecycerView=view.findviewbyid(r.id.list)”给我的错误不能解析符号“list”。如果我尝试输入“R.ID”我找不到r.id.list,但我确定我给它的id是“list”。 我只是在代码中添加了依赖项和import语句。我试图重新同步和清理项目,但没有结果。 这