'gcloud deploy'抱怨同时拥有.gcloudignore和skip_files,尽管我都没有 [英] 'gcloud deploy' complains about having both a .gcloudignore and skip_files even though I have neither

查看:73
本文介绍了'gcloud deploy'抱怨同时拥有.gcloudignore和skip_files,尽管我都没有的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!

问题描述

我正在尝试将Django(v2.1)应用程序部署到App Engines Python37运行时.这是我的app.yaml,它取自

I'm trying to deploy a Django (v2.1) app to App Engines Python37 runtime. This is my app.yaml which was taken from a Google example:

# [START django_app]
runtime: python37
#api_version: 1
#threadsafe: yes

handlers:
- url: /static
  static_dir: static/
- url: .*
  script: <project_name>.wsgi.application

# Only pure Python libraries can be vendored
# Python libraries that use C extensions can
# only be included if they are part of the App Engine SDK 
# Using Third Party Libraries: https://cloud.google.com/appengine/docs/python/tools/using-libraries-python-27
#libraries:
#- name: MySQLdb
#  version: 1.2.5
# [END django_app]

# Google App Engine limits application deployments to 10,000 uploaded files per
# version. The skip_files section allows us to skip virtual environment files
# to meet this requirement. The first 5 are the default regular expressions to
# skip, while the last one is for all env/ files.
#skip_files:
#- ^(.*/)?#.*#$
#- ^(.*/)?.*~$
#- ^(.*/)?.*\.py[co]$
#- ^(.*/)?.*/RCS/.*$
#- ^(.*/)?\..*$
#- ^env/.*$

所有注释(最基本的设置除外)都被注释掉,并且仓库中没有.gcloudignore文件.然而,当执行gcloud app deploy时,我收到以下错误消息:

All but the most basic settings are commented out and there is no .gcloudignore file in the repo. Yet when doing gcloud app deploy I get the following error message:

ERROR: (gcloud.app.deploy) You cannot use skip_files and have a .gcloudignore file in the same application. You should convert your skip_files patterns and put them in your .gcloudignore file. For information on the format and syntax of .gcloudignore files, see https://cloud.google.com/sdk/gcloud/reference/topic/gcloudignore.

我读过某个地方,在部署过程中会自动创建一个.glcoudignore,但是即使那也不应该成为问题,因为我的app.yaml中没有skip_files.

I've read somewhere that a .glcoudignore is created automatically during deployment, but even that shouldn't be a problem since I have no skip_files in my app.yaml.

有人可以告诉我我在做什么错吗?

Can someone tell me what I'm doing wrong here?

推荐答案

即使您已将其注释掉,Gcloud部署也会看到#skip_files:行.删除该行,或更改其拼写.

Gcloud deploy is seeing the #skip_files: line, even though you have it commented out. Delete that line, or change its spelling.

这篇关于'gcloud deploy'抱怨同时拥有.gcloudignore和skip_files,尽管我都没有的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!

查看全文
登录 关闭
扫码关注1秒登录
发送“验证码”获取 | 15天全站免登陆