Google Publisher Plugin credentials not configured correctly

I am using gerrit with the Google Play Android plugin for publishers as described in the plugin tutorial on the plugin page. .apk is signed, and if I download it via google play gui, it will load well.

When I try to download it using gerrit, I get an en error. Register 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 the p12 key with an email address that looks like

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

and the key file that I received when generating the key on the page, which looks like this:

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

I created a new service account with the option "Finish a new private key" and the P12 camera was selected. I also granted access to this key in the api settings of the Google Play Developer Console

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

The service account has all possible permissions. What could be the problem?

+6
source share
4 answers

I have the same problem, but I am solving with changing the Google oAuth plugin (dependency for the Google Play publishing plugin) from version from version to version v0.3.

You can downgrade by installing manualy.

This works for me.

+6
source
  • As János answer , Update Google OAuth Credentials Plugin to v0.3
    • Download here
    • Jenkins Management> Plugin Management> Advanced> Plugin Download
  • Switch to Token Macro Macro before 1.10
    • Download here
    • Jenkins Management> Plugin Management> Advanced> Plugin Download
  • Reimport JSON into Credential Storage
    • Credentials> (select a credential domain)> (find Google credentials)> Click Refresh (toolbar icon)> Select File> Select Previously Uploaded JSON File> Save
0
source

This is 2018 and, unfortunately, the problem still exists. The decisions from Janos and Andy Answer are correct.

Let me write down a working solution step by step if someone already has the latest Google Play Publishing plugin installed.

  1. Remove the Google OAuth Credentials Plugin
  2. Remove Google Play Plugin to Publish
  3. Download and manually install the Google OAuth Credentials plugin v0.3 from here
  4. Restart Jenkins to complete the installation
  5. Download and manually install the Google Play Publishing Plugin v1.5 from here
  6. Download and manually install the token-macro plugin v1.10 from here

Now the error from the Google Play Publishing plugin should have disappeared.

Update : Following the mentioned procedure of downgrading the version numbers of some plugins, you will lose the GIT section from your Jenkins workstations. That is: you cannot select the Git branch for your work in Jenkins, and the poll in your Git branch will stop.

0
source

The problem was that when the credential file was uploaded to the Google OAuth plugin for Jenkins, the credentials did not load correctly and there was no credential file for Google Play Publisher to work correctly.

-1
source

Source: https://habr.com/ru/post/1240265/


All Articles