简体   繁体   English

无法从gcloud克隆到git:“找不到gcloud的git凭证帮助器。”

[英]Cannot clone from gcloud to git: “Could not find gcloud's git credential helper.”

I've got a git repository in Google's Cloud Platform. 我在Google的Cloud Platform中有一个git存储库。 I'm trying to clone it into a local git report like this: 我正在尝试将其克隆到本地git报告中,如下所示:

git config credential.helper gcloud.sh
gcloud source repos clone myrepository --project=myprojectid

It's giving me this error: 这给了我这个错误:

ERROR: (gcloud.source.repos.clone) Could not find gcloud's git credential helper. Please make sure the Cloud SDK bi
n folder is in PATH.

I've verified that gcloud is in $PATH: 我已验证gcloud在$ PATH中:

> which gcloud
/usr/bin/gcloud

This is a new GCE instance of SUSE. 这是SUSE的新GCE实例。 Works on mac but not on this SUSE server. 在Mac上可用,但在此SUSE服务器上不可用。

Any ideas? 有任何想法吗?

The Cloud SDK's bin folder needs to be in $PATH , not just gcloud . Cloud SDK的bin文件夹需要位于$PATH ,而不仅仅是gcloud

/usr/bin/gcloud is likely either a symlink or a wrapper script that points to a full, google-cloud-sdk installation directory. /usr/bin/gcloud可能是指向完整的google-cloud-sdk安装目录的符号链接或包装脚本。 You need to add google-cloud-sdk/bin to your path, since that's where the credential helper is. 您需要在路径中添加google-cloud-sdk/bin ,因为这是凭据帮助程序所在的位置。

(This is due to a limitation in the git-credential-helper model. (这是由于git-credential-helper模型中的限制。

声明:本站的技术帖子网页,遵循CC BY-SA 4.0协议,如果您需要转载,请注明本站网址或者原文地址。任何问题请咨询:yoyou2525@163.com.

 
粤ICP备18138465号  © 2020-2024 STACKOOM.COM