【发布时间】:2018-07-05 12:16:56
【问题描述】:
我正在尝试使用 gradle 部署我的第一个应用引擎 Spring Boot 项目,但在运行“gradle appengineDeploy”时遇到以下错误:
ERROR: (gcloud.app.deploy) Error Response: [403] Operation not allowed
Details: [
[
{
"@type": "type.googleapis.com/google.rpc.ResourceInfo",
"description": "The \"appengine.applications.get\" permission is required.",
"resourceType": "gae.api"
}
]
]
这是我的 build.gradle:
buildscript {
repositories {
mavenCentral()
}
dependencies {
classpath("org.springframework.boot:spring-boot-gradle-plugin:1.5.2.RELEASE")
classpath("com.google.cloud.tools:appengine-gradle-plugin:+")
}
}
apply plugin: 'java'
apply plugin: 'eclipse'
apply plugin: 'idea'
apply plugin: 'org.springframework.boot'
apply plugin: 'com.google.cloud.tools.appengine'
jar {
baseName = 'gs-spring-boot'
version = '0.1.0'
}
repositories {
mavenCentral()
maven {
url 'https://maven-central.storage.googleapis.com'
}
}
sourceCompatibility = 1.8
targetCompatibility = 1.8
dependencies {
compile("org.springframework.boot:spring-boot-starter-web")
// tag::actuator[]
compile("org.springframework.boot:spring-boot-starter-actuator")
// end::actuator[]
// tag::tests[]
testCompile("org.springframework.boot:spring-boot-starter-test")
// end::tests[]
//compile("com.google.cloud.tools:appengine-maven-plugin:1.0.0")
//appengineSdk 'com.google.appengine:appengine-java-sdk:1.9.50'
compile('com.google.appengine:appengine:+')
}
appengine {
deploy { // deploy configuration
stopPreviousVersion = true // default - stop the current version
promote = true // default - & make this the current version
}
}
请告诉我如何继续。
【问题讨论】:
-
听起来您无权部署到此项目。哪个帐户拥有该项目,您从哪个帐户进行部署?
-
我正在使用拥有该项目的同一帐户进行部署
-
如果您本地 gcloud 配置中的项目 ID 与谷歌云控制台中的项目 ID 不匹配,则会引发相同的错误消息
-
您找到解决方案了吗?
标签: google-app-engine spring-boot gcloud gcp