You need to enable JavaScript to run this app.
优惠活动
大模型
产品
解决方案
定价
更多

部署BitBucket到Google App Engine遇认证及配置错误求助

Fixing BitBucket to Google App Engine Deployment Errors

Hey Vijay, let's tackle those two deployment errors you're hitting one by one:

1. INVALID_ARGUMENT: WEB-INF/appengine-web.xml is required for this runtime (400 Error)

This error means your App Engine runtime (likely Java standard environment) expects a mandatory configuration file that's missing from your deployment package. Here's how to fix it:

  • Locate the correct directory: For most Java web projects, this file needs to live in src/main/webapp/WEB-INF/ (if using Maven/Gradle) or directly in a root-level WEB-INF/ folder.
  • Create a basic appengine-web.xml: Add this file with at minimum your app ID and version. Example:
<?xml version="1.0" encoding="utf-8"?>
<appengine-web-app xmlns="http://appengine.google.com/ns/1.0">
  <application>evadev0010</application>
  <version>1</version>
  <threadsafe>true</threadsafe>
  <!-- Add runtime-specific configs like <runtime>java11</runtime> if needed -->
</appengine-web-app>
  • Verify deployment package inclusion: Check your .gitignore file to make sure it's not excluding the WEB-INF directory. If it is, remove that rule so the file gets pushed to BitBucket and included in the deployment.

2. UNAUTHENTICATED: Request is missing required authentication credential (401 Error)

This points to missing or invalid authentication between BitBucket Pipelines and Google Cloud. Let's resolve this:

  • Confirm service account setup: Ensure you created a Google Cloud service account with the App Engine Deployer role (or equivalent permissions like appengine.services.create and appengine.versions.create). Download its JSON key file.
  • Check BitBucket variables: Go to your BitBucket repo's Settings > Repository variables (use Secure variables for sensitive data) and add GOOGLE_APPLICATION_CREDENTIALS with the full content of the JSON key.
  • Validate deployment script: Update your bitbucket-pipelines.yml to properly authenticate before deploying. Example snippet:
script:
  # Write the credential content to a file
  - echo "$GOOGLE_APPLICATION_CREDENTIALS" > gcloud-key.json
  # Activate the service account
  - gcloud auth activate-service-account --key-file gcloud-key.json
  # Deploy to App Engine
  - gcloud app deploy --project evadev0010
  • Double-check permissions: Make sure the service account isn't restricted by any IAM policies that block App Engine deployment access.

Start with fixing the missing appengine-web.xml first, then verify the authentication setup. That should get your deployment running smoothly!

内容的提问来源于stack exchange,提问作者Vijay Chougule

相关产品推荐
方舟 Agent Plan

超全模态模型 × Harness 升级,最新支持 Deepseek-V4.1-Flash、GLM-5.3 系列、Doubao-Seedream-5.0-pro、Kimi-K3 (部分), 限时 9.9 元起

最近更新时间:2026.05.08 10:32:43