Most Google cloud services require an application to be authorized for access. A service account is a special Google account that belongs to a deployed application in a particular GCP project instead of an individual end user. When running on App Engine, the Cloud Client Libraries for Java use the service account to call Google service APIs.
When you run the same application in the App Engine emulator on your local box, you need to specify the GCP project and the service account.
Configuring access for a local server
To configure your local server to access the Cloud Client Libraries for Java:
Select Run > Run Configurations.
Either create a new App Engine Local Server run configuration, or select an existing one.
Open the Cloud Platform tab.
Select the Account you want to use, or add a new account.
Select the Project associated with your application.
Select Create New Key.
Eclipse creates a new service key and displays the path in the Service key field.
You can also select a service account key you have created in the API console and downloaded to your local file system as a JSON file.