我正在尝试使用 Travis 部署应用程序 AWS Beanstalk。每次我使用时都会收到一条错误消息,提示部署和访问密钥 ID 失败。
下面是我构建的 travis.yml 文件:
sudo: required
language: generic
services:
- docker
before_install:
- docker build -t muhammadhussain/docker-react -f dockerfile.dev .
script:
- docker run -e CI=true muhammadhussain/docker-react npm run test
deploy:
provider: elasticbeanstalk
region: "us-east-1"
app: "docker-react"
env: "Dockerreact-env"
bucket_name: "elasticbeanstalk-us-east-1-976709496734"
bucket_path: "docker-react"
on:
branch: master
access_key_id: "$AWS_ACCESS_KEY"
secrect_access_key: "$AWS_SECRET_KEY"`
以下是 Travis CI 的以下输出:
Installing deploy dependencies
Preparing deploy
No stash entries found.
missing access_key_id
failed to deploy
您的 YAML 文件中似乎有一些不正确的制表符和拼写
替换这个块
on:
branch: master
access_key_id: "$AWS_ACCESS_KEY"
secrect_access_key: "$AWS_SECRET_KEY"
有了这个
on:
branch: master
access_key_id: "$AWS_ACCESS_KEY"
secret_access_key: "$AWS_SECRET_KEY"