You need to enable JavaScript to run this app.
优惠活动
大模型
产品
解决方案
定价
更多

无法通过gcloud命令启动Google Cloud Shell的问题咨询

解决gcloud cloud-shell ssh 500内部错误的方案

错误信息

~ % gcloud cloud-shell ssh                     
Cloud Shell中GCP CLI工具的自动认证已禁用。如需启用,请添加`--authorize-session`参数重新运行命令。
Starting your Cloud Shell machine...
ERROR: (gcloud.cloud-shell.ssh) HttpError accessing <https://cloudshell.googleapis.com/v1/users/me/environments/default:start?alt=json>: response: <{'vary': 'Origin, X-Origin, Referer', 'content-type': 'application/json; charset=UTF-8', 'content-encoding': 'gzip', 'date': 'Fri, 15 Sep 2023 14:20:04 GMT', 'server': 'ESF', 'cache-control': 'private', 'x-xss-protection': '0', 'x-frame-options': 'SAMEORIGIN', 'x-content-type-options': 'nosniff', 'alt-svc': 'h3=":443"; ma=2592000,h3-29=":443"; ma=2592000', 'transfer-encoding': 'chunked', 'status': 500}>, content <{
  "error": {
    "code": 500,
    "message": "Internal error encountered.",
    "status": "INTERNAL"
  }
}
>
这可能是由于网络连接问题导致的。请检查您的网络设置以及尝试访问的服务状态。

解决步骤

  • 带认证参数重新执行命令:
    gcloud cloud-shell ssh --authorize-session
    
  • 重置Cloud Shell环境:在GCP控制台的Cloud Shell界面,点击右上角设置图标,选择「重置Cloud Shell」,完成后再尝试CLI连接。
  • 更新gcloud CLI到最新版本:
    gcloud components update
    
  • 重新认证gcloud:
    gcloud auth login
    
  • 检查GCP Cloud Shell服务状态:在GCP控制台的「服务健康」页面查看Cloud Shell运行状态,确认是否存在服务故障。
  • 尝试通过GCP控制台直接启动Cloud Shell,验证是否为CLI端问题。

内容的提问来源于stack exchange,提问作者jw25115

相关产品推荐
方舟 Agent Plan

超全模态模型 × Harness 升级,最新支持 Deepseek-V4.1-Flash、GLM-5.3 系列、Doubao-Seedream-5.0-pro、Kimi-K3 (部分), 限时 9.9 元起

最近更新时间:2026.07.11 02:03:23