Set up ADC for a cloud-based development environment
When you use a Trusted Cloud cloud-based development environment such as
Cloud Code, the tool uses the credentials you provided when
you signed in, and manages any authorizations required. You cannot use the
gcloud CLI to configure ADC in these environments. If
you need to use a different user account to configure ADC, or configure ADC
using a service account, use a local development environment or a
Trusted Cloud compute resource as your development environment.
What's next
Except as otherwise noted, the content of this page is licensed under the Creative Commons Attribution 4.0 License, and code samples are licensed under the Apache 2.0 License. For details, see the Google Developers Site Policies. Java is a registered trademark of Oracle and/or its affiliates.
Last updated 2025-07-02 UTC.
[[["Easy to understand","easyToUnderstand","thumb-up"],["Solved my problem","solvedMyProblem","thumb-up"],["Other","otherUp","thumb-up"]],[["Missing the information I need","missingTheInformationINeed","thumb-down"],["Too complicated / too many steps","tooComplicatedTooManySteps","thumb-down"],["Out of date","outOfDate","thumb-down"],["Samples / code issue","samplesCodeIssue","thumb-down"],["Other","otherDown","thumb-down"]],["Last updated 2025-07-02 UTC."],[[["Cloud-based Google Cloud development environments like Cloud Shell and Cloud Code automatically manage credentials and authorizations using your sign-in information."],["The gcloud CLI cannot be used to configure Application Default Credentials (ADC) in Cloud Shell or Cloud Code environments."],["For alternative user accounts or service account ADC configuration, utilize a local or Google Cloud compute environment."],["Explore various resources on Cloud Code, Cloud Shell, ADC credential discovery, client libraries, and REST authentication methods for more information."]]],[]]