我需要克隆一个远程存储库。我已经安装了git和gcloud以及在PATH中。(我在win10中)
我只是按照谷歌的第一步指南。在Ubuntu工作,但我在Win10上需要它。
这是消息错误:
gcloud source repos clone default C:\Users\XXX
git: 'credential-gcloud.sh' is not a git command. See 'git --help'.
Username for 'https://source.developers.google.com': XXXX
Password for 'https://XXXX@source.developers.google.com':
git: 'credential-gcloud.sh' is not a git command. See 'git --help'.
fatal: remote error: Invalid username/password.
You may need to use your OAuth token password; Note that generated google.com passwords are not compatible with private repositories
ERROR: (gcloud.source.repos.clone) Repository in [C:\Users\XXX] is misconfigured.
两天没做任何解决方案,做了几个google reasearch。 有人可以帮帮我吗?
C:\Users\jadov\Desktop\Repositorios>git config --list
core.symlinks=false
core.autocrlf=true
core.fscache=true
color.diff=auto
color.status=auto
color.branch=auto
color.interactive=true
help.format=html
http.sslcainfo=C:/Program Files/Git/mingw64/ssl/certs/ca-bundle.crt
diff.astextplain.textconv=astextplain
rebase.autosquash=true
user.name=XXXXX
user.email=XXXXX5@gmail.com
core.repositoryformatversion=0
core.filemode=true
core.bare=false
core.logallrefupdates=true
credential.helper=gcloud.sh
remote.origin.url=https://source.developers.google.com/p/PROJECT_ID/r/default
remote.origin.fetch=+refs/heads/*:refs/remotes/origin/*
branch.master.remote=origin
branch.master.merge=refs/heads/master
此致
答案 0 :(得分:2)
如果您使用自制软件安装google-cloud-sdk,则可能忽略了这些说明(这很容易做到,因为它们会快速滚动,然后是SDK的自我更新)。
这让git和我一起使用gcloud:
google-cloud-sdk is installed at /usr/local/Caskroom/google-cloud-sdk/latest/google-cloud-sdk. Add your profile:
for bash users
source '/usr/local/Caskroom/google-cloud-sdk/latest/google-cloud-sdk/path.bash.inc'
source '/usr/local/Caskroom/google-cloud-sdk/latest/google-cloud-sdk/completion.bash.inc'
for zsh users
source '/usr/local/Caskroom/google-cloud-sdk/latest/google-cloud-sdk/path.zsh.inc'
source '/usr/local/Caskroom/google-cloud-sdk/latest/google-cloud-sdk/completion.zsh.inc'
for fish users
set fish_user_paths /usr/local/Caskroom/google-cloud-sdk/latest/google-cloud-sdk/bin
set -x MANPATH /usr/local/Caskroom/google-cloud-sdk/latest/google-cloud-sdk/help/man /usr/local/share/man /usr/share/man /opt/x11/share/man
Run fish_update_completions to generate completions for fish based on the man pages
您可能还想重置git配置:
git config --global --unset credential.helper
git config --global --add --path credential.helper gcloud
答案 1 :(得分:0)
你不能在windows credential.helper
上使用gcloud.sh使用git config credential.helper gcloud.cmd