簡體   English   中英

AWS 代碼部署失敗並顯示錯誤:指定文件已存在於此

[英]AWS code deploy fails with error : specified file already exists at this

我嘗試了 2 個案例

使用 github 作為存儲庫

  1. 多次使用代碼管道進行新部署到所需位置:在這種情況下,代碼部署代理會自動覆蓋文件。

  2. 在安裝位置 (/var/www/html) 手動創建文件時,codedeploy 拋出錯誤“部署失敗,因為此位置已存在指定文件:/var/www/html/abc.php

我無法覆蓋用於第二種情況的文件,

試過: overwrite:true ->這不起作用

appspec.yml 文件

version: 0.0
os: linux
files:
  - source: /
    destination: /var/www/html/
    overwrite: true
    

這將起作用。

version: 0.0
os: linux
files:
  - source: /
    destination: /var/www/html/
file_exists_behavior: OVERWRITE

暫無
暫無

聲明:本站的技術帖子網頁,遵循CC BY-SA 4.0協議,如果您需要轉載,請注明本站網址或者原文地址。任何問題請咨詢:yoyou2525@163.com.

 
粵ICP備18138465號  © 2020-2024 STACKOOM.COM