Gerrit googleplay publisher plugin credentials has not been configured correctly
Asked Answered
M

3

6

I use gerrit with Google Play Android Publisher Plugin the way it described in plugin tutorial on the plugin page. .apk is signed and if I upload it via google play gui it uploads well.

When I try to upload it using gerrit i get en error. Log below:

Upload failed: The Google Service Account credential 'GooglePlayAPICredentials' has not been configured correctly.
Update the credential, ensuring that the required data have been entered, then try again
- No changes have been applied to the Google Play account
Build step 'Upload Android APK to Google Play' marked build as failure
Finished: FAILURE

For google play credentials i use p12 key with email that looks like

serviceaccountforgerrit@api-64****-*****8.iam.gserviceaccount.com 

and the keyfile i got while generating the key on a page that looks like:

https://console.developers.google.com/permissions/serviceaccounts?project=api-64****-*****8

I have created a new service account with "Furnish a new private key" checkbox checked and P12 radiobutton selected. I have also granted access to this key in google play developer console api settings

https://play.google.com/apps/publish/?dev_acc=*******#ApiAccessPlace

Service account have every permission possible. What could be the problem?

Merissameristem answered 10/1, 2016 at 8:22 Comment(1)
Did you find any solution?Portuna
S
6

I have a same issue, but I solve with change the Google oAuth plugin (dependency for Google Play publish plugin) from v0.4 to v0.3.

You can downgrade by install manualy.

  1. Download here: https://updates.jenkins-ci.org/download/plugins/google-oauth-plugin/ (this is a *.hpi file)

  2. Manage Jenkins > Manage Plugins > Advanced > Upload plugin

It works for me.

Sonni answered 21/1, 2016 at 19:29 Comment(2)
Worked for me - @Merissameristem should mark as the answerExam
Worked for me too, but it's nuts since this is still occurring one year on! Any idea which plugin is actually at fault here?Swordbill
R
0
  • As per János answer, Downgrade Google OAuth Credentials plugin to v0.3
    • Download here
    • Manage Jenkins > Manage Plugins > Advanced > Upload plugin
  • Downgrade Token Macro Plugin to 1.10
    • Download here
    • Manage Jenkins > Manage Plugins > Advanced > Upload plugin
  • Re-import your JSON into the credential store
    • Credentials > (select credential domain) > (find your google credential) > Click Update (toolbox icon) > Choose File > Select the JSON file you downloaded previously > Save
Raseda answered 3/4, 2016 at 15:15 Comment(0)
P
0

It's 2018 and unfortunately the issue still exists. The solutions from János answer and Andy Answer are correct.

Let me write down the working solution step by step in case if someone already have the latest Google Play publish plugin installed.

  1. Uninstall the Google OAuth Credentials plugin
  2. Uninstall the Google Play publish plugin
  3. Download and manually install the Google OAuth Credentials plugin Version v0.3 from here
  4. Restart Jenkins to complete this installation
  5. Download and manually install the Google Play publish plugin Version v1.5 from here
  6. Download and manually install the token-macro plugin Version v1.10 from here

Now the error from Google Play publish plugin should have gone.

Update: By following the mentioned procedure of downgrading the version numbers of certain plugins, you would loose the GIT section from you Jenkins Jobs. i.e: You would not be able to select the Git Branch for your Jenkins Job and the Polling to your Git Branch would stop.

Paramo answered 17/4, 2018 at 9:40 Comment(0)

© 2022 - 2024 — McMap. All rights reserved.