WARNING: unable to change permissions for everybody:

前端 未结 8 975
后悔当初
后悔当初 2020-11-28 11:14

When running the Java quickstart sample at https://developers.google.com/drive/web/quickstart/java?hl=hu in NetBeans, I\'m receiving the error code:

Jun 04,         


        
相关标签:
8条回答
  • 2020-11-28 11:52

    Basically if you already enabled de Drive API and created credentials.json file at Google Drive API Rest, now you need :

    1 - Remove the tokens directory generated in you last execution. In this directory contains a file StoredCredential. 2 - Change de SCOPE to DriveScopes.DRIVE like sample bellow:

    private static List SCOPES = Collections.singletonList(DriveScopes.DRIVE);

    3 - Re run the program. It will be request that you login in your google account to give the access consent.

    4 - It will be generated a new one tokens directory in your project and now with with read and write permissions at google Drive.

    This work for me.

    0 讨论(0)
  • 2020-11-28 11:53

    I was facing same issue in Eclipse. Here’s a solution:

    1. Run eclipse in admin mode

    2. Clear the directory C:/Users/<username>.credentials/calendar-java-quickstart.json

    3. Copy the .json file the bin directory, e.g. bin/main/resources/client_secret.json

    You are free to run now.

    0 讨论(0)
提交回复
热议问题