为云端开发环境设置 ADC
当您使用 Cloud Code 等 Trusted Cloud 云端开发环境时,该工具会使用您登录时提供的凭据,并管理任何所需的授权。在这些环境中,您无法使用 gcloud CLI 配置 ADC。如果您需要使用其他用户账号配置 ADC,或使用服务账号配置 ADC,请使用本地开发环境或 Trusted Cloud 计算资源作为开发环境。
后续步骤
如未另行说明,那么本页面中的内容已根据知识共享署名 4.0 许可获得了许可,并且代码示例已根据 Apache 2.0 许可获得了许可。有关详情,请参阅 Google 开发者网站政策。Java 是 Oracle 和/或其关联公司的注册商标。
最后更新时间 (UTC):2025-08-08。
[[["易于理解","easyToUnderstand","thumb-up"],["解决了我的问题","solvedMyProblem","thumb-up"],["其他","otherUp","thumb-up"]],[["没有我需要的信息","missingTheInformationINeed","thumb-down"],["太复杂/步骤太多","tooComplicatedTooManySteps","thumb-down"],["内容需要更新","outOfDate","thumb-down"],["翻译问题","translationIssue","thumb-down"],["示例/代码问题","samplesCodeIssue","thumb-down"],["其他","otherDown","thumb-down"]],["最后更新时间 (UTC):2025-08-08。"],[[["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."]]],[]]