GoogleCloudPlatform / gradle-appengine-plugin

Gradle plugin that provides tasks for uploading, running and managing Google App Engine projects
Apache License 2.0
236 stars 60 forks source link

Stuck on auth step for appengineUpdate #222

Closed AlistairB closed 8 years ago

AlistairB commented 8 years ago

Hi,

I had a jenkins box that was using appengineUpdate and oauth and working correctly. I rebuilt the box recently and I am apparently getting stuck at the authentication step.

appengine {
    downloadSdk = true

    httpPort = 8888

    warDir = new File(project.name + '/dist/' + rootProject.ext.mode)

    appcfg {
        oauth2 = true

        app {
            id = "my-app-id"
        }
    }
}

I am able to run on the dev server fine so definitely everything is being built. Anyway when I run appengineUpdate I get to this step

App Engine SDK root = /var/lib/jenkins/.gradle/appengine-sdk/appengine-java-sdk-1.9.30
Java classpath = /usr/lib/gradle/2.9/lib/gradle-launcher-2.9.jar:/var/lib/jenkins/.gradle/appengine-sdk/appengine-java-sdk-1.9.30/lib/appengine-tools-api.jar
Webapp source directory = /var/lib/jenkins/jobs/wmar_website/workspace/wmar-combined/src/main/webapp
Starting update process...
Using params = [--oauth2, --enable_jar_splitting, update, /var/lib/jenkins/jobs/wmar_website/workspace/wmar-combined/build/exploded-app]

And nothing happens. I am expecting it to spit out a link (if I recall) that I can visit to authenticate and give me back a token or something but it just sits there. If I type in something random I get:

Either the access code is invalid or the OAuth token is revoked.Details: invalid_grant

I have tried including my email and also not using oauth but can't figure out how to get past this.

How can I authenticate with oauth or is this some kind of issue?

loosebazooka commented 8 years ago

Is your Jenkins consuming stdout or something? On Dec 26, 2015 06:27, "Alistair Burrowes" notifications@github.com wrote:

Hi,

I had a jenkins box that was using appengineUpdate and oauth and working correctly I rebuilt the box recently and I am apparently getting stuck at the authentication step

appengine { downloadSdk = true

httpPort = 8888

warDir = new File(projectname + '/dist/' + rootProjectextmode)

appcfg {
    oauth2 = true

    app {
        id = "my-app-id"
    }
}

}

I am able to run on the dev server fine so definitely everything is being built Anyway when I run appengineUpdate I get to this step

App Engine SDK root = /var/lib/jenkins/gradle/appengine-sdk/appengine-java-sdk-1930 Java classpath = /usr/lib/gradle/29/lib/gradle-launcher-29jar:/var/lib/jenkins/gradle/appengine-sdk/appengine-java-sdk-1930/lib/appengine-tools-apijar Webapp source directory = /var/lib/jenkins/jobs/wmar_website/workspace/wmar-combined/src/main/webapp Starting update process Using params = [--oauth2, --enable_jar_splitting, update, /var/lib/jenkins/jobs/wmar_website/workspace/wmar-combined/build/exploded-app]

And nothing happens I am expecting it to spit out a link (if I recall) that I can visit to authenticate and give me back a token or something but it just sits there If I type in something random I get:

Either the access code is invalid or the OAuth token is revokedDetails: invalid_grant

I have tried including my email and also not using oauth but can't figure out how to get past this

How can I authenticate with oauth or is this some kind of issue?

— Reply to this email directly or view it on GitHub https://github.com/GoogleCloudPlatform/gradle-appengine-plugin/issues/222 .

AlistairB commented 8 years ago

Sorry this is running from the command line as the jenkins user. Trying to get that working first.

AlistairB commented 8 years ago

Ah whoops forgot you can do this via ssh as it's trying to open the link in the browser.