gupload
gupload copied to clipboard
request had insufficient authentication scopes error
Hi. I'm using gupload to upload my android apk from gitlab ci/cd to google drive. I created a service account on google cloud and downloaded the credentials and saved in gitlab environment variables. this my credentials:
`{
"type": "service_account",
"project_id": "**************435157288647-268",
"private_key_id": "********ec6d3336a1705083adc9084fa0e884eb",
"private_key": "-----BEGIN PRIVATE KEY-----\nMIIEvQIBAD......\n-----END PRIVATE KEY-----\n",
"client_email": "android-straiberry-ci@pc-api-61424124*****288647-268.iam.gserviceaccount.com",
"client_id": "104981693329087082717",
"auth_uri": "https://accounts.google.com/o/oauth2/auth",
"token_uri": "https://oauth2.googleapis.com/token",
"auth_provider_x509_cert_url": "https://www.googleapis.com/oauth2/v1/certs",
"client_x509_cert_url": "https://www.googleapis.com/robot/v1/metadata/x509/android-straiberry-ci%40pc-api-6142412435157288647-268.iam.gserviceaccount.com"
}`
and this is my pipeline job to upload the apk:
`assembleReleaseApkOnGoogleDrive:
stage: internalOnGoogleDrive
script:
# Outpu the keystore
- base64 -d ${KEY_STORE_FILE} > my_keystore.jks
# Output Playstore Service Account Key JSON to a runtime JSON file
- echo $GCP_PLAYSTORE_SERIVCE_ACCOUNT_KEY_JSON > credentials.json
- echo "storeFile=../my_keystore.jks" >> keystore.properties
- echo "storePassword=${STORE_PASSWORD}" >> keystore.properties
- echo "keyAlias=${KEY_ALIAS}" >> keystore.properties
- echo "keyPassword=${KEY_PASSWORD}" >> keystore.properties
- echo "playServiceAccountEmail=${GCP_PLAYSTORE_SERIVCE_ACCOUNT_EMAIL}" >> keystore.properties
- ./gradlew clean --stacktrace --warning-mode=all
- ./gradlew assembleFarsiRelease --stacktrace --warning-mode=all
- gupload --to 1T6LxAZg2BXVdGT7nJtIrlVa02mA4ZPod --file app-dentai-release.apk app/build/outputs/apk/farsi/release/app-farsi-release.apk `
But i'm getting this error and don't know what's wrong. I think something is wrong with my credentials.
request had insufficient authentication scopes