在Linux上,我正在使用Google gcloud。我注意到当我使用以下命令时,并非总是将新文件或修改过的文件上传到Google云端存储:
gcloud应用部署
我收到以下反馈:
╔════════════════════════════════════════════════════════════╗
╠═ Uploading 0 files to Google Cloud Storage ═╣
╚════════════════════════════════════════════════════════════╝
File upload done.
Updating service [default]...done.
Setting traffic split for service [default]...done.
我使用的版本是:
Google Cloud SDK 318.0.0
bq 2.0.62
core 2020.11.06
gsutil 4.54
是否有一种强制文件上传的方法?
谢谢, 汉斯
答案 0 :(得分:0)
我通过创建一个“空”的重置项目解决了这个问题,你会在下面找到 app.yaml。当这个错误发生时,我选择这个重置项目,部署它,然后我选择我的真实项目并再次部署它。这对我有用。
# application: reset
# version: 1
runtime: python27
automatic_scaling:
max_instances: 1
api_version: 1
threadsafe: true
default_expiration: "1s"
handlers:
- url: /
static_files: reset.html
upload: reset.html
secure: always
http_headers:
Vary: Accept-Encoding
Content-Security-Policy: default-src 'self'; style-src 'self' 'unsafe-inline'; script-src 'self' 'unsafe-inline'; img-src 'self' data:; object-src 'none'; frame-ancestors 'none'
Strict-Transport-Security: max-age=63072000
X-Content-Type-Options: nosniff
X-Frame-Options: DENY
X-XSS-Protection: 1; mode=block