导致Google gcloud错误消息的原因是“错误:(gcloud)无效的选择:'get'。你是不是指'meta'?“意思? [英] What causes Google gcloud error message "ERROR: (gcloud) Invalid choice: 'get'. Did you mean 'meta'?" mean?

查看:194
本文介绍了导致Google gcloud错误消息的原因是“错误:(gcloud)无效的选择:'get'。你是不是指'meta'?“意思?的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!

问题描述

当我尝试将 git push 加入Google云存储库时,我收到了上述消息。
然后它要我输入我的凭证。之后,我得到以下错误:

lockquote

有效的选择是[auth,components,compute,config,container,
deployment-经理,dns,码头,反馈,帮助,信息,初始化,元,美元b b预览,项目,来源,sql,主题,版本]。致命:身份验证
https://source.developers.google.com/

有什么遗漏吗?

在你的设置中显示git config --list ,git凭证助手指向

  credential.helper = / opt / google-cloud-sdk / bin / gcloud 

这看起来不正确。帮手不应该包括绝对路径。您可以通过运行

  $ git config credential.helper gcloud.sh 


$ b

对于上面的工作 gcloud 必须在你的PATH环境变量中,否则git将无法找到 git-credential-gcloud.sh 。确保

  $ which git-credential-gcloud.sh 

返回它所在的路径。如果没有,您可以运行以设置路径。

  $ source /opt/google-cloud-sdk/path.bash.inc 


When I try to git push to Google cloud repository, I get the above message. It then asks me to enter my credentials. After that I get the following error:

Valid choices are [auth, components, compute, config, container, deployment-manager, dns, docker, feedback, help, info, init, meta, preview, projects, source, sql, topic, version]. fatal: Authentication failed for 'https://source.developers.google.com/p/projectname/'

Is there anything am missing?

解决方案

As git config --list shows in your setup, git credential helper points to

credential.helper=/opt/google-cloud-sdk/bin/gcloud

This appears to be incorrect. The helper should not include absolute path. You can reset it to correct value by running

$ git config credential.helper gcloud.sh

For the above to work gcloud MUST be in your PATH environment variable, as otherwise git will not be able to find git-credential-gcloud.sh. Make sure

$ which git-credential-gcloud.sh

returns path where it is located. If it does not you can run to set path

$ source /opt/google-cloud-sdk/path.bash.inc

这篇关于导致Google gcloud错误消息的原因是“错误:(gcloud)无效的选择:'get'。你是不是指'meta'?“意思?的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!

查看全文
相关文章
登录 关闭
扫码关注1秒登录
发送“验证码”获取 | 15天全站免登陆