解决credential-cache‘ is not a git command. See ‘git --help

昨天使用sourceTree下载gitee上面的仓库代码碰到一个问题:

命令: git -c diff.mnemonicprefix=false -c core.quotepath=false --no-optional-locks ls-remote https://gitee.com/xxx/xxx.git
输出: 
错误: git: 'credential-cache' is not a git command. See 'git --help'.
git: 'credential-cache' is not a git command. See 'git --help'.
remote: [: Incorrect username or password (access token)[0m
fatal: Authentication failed for 'https://gitee.com/xxx/xxx.git/'

我一直以为是我们sourceTree没有添加托管账号 向下面这张图一样

解决credential-cache‘ is not a git command. See ‘git --help_第1张图片

实际不是,原因是因为Git Credential Manager for Windows v1.20 这个管理工具没有安装,它没有唤醒弹窗用于输入用户名密码。

下载好之后就ok了,下载地址如下:https://github-production-release-asset-2e65be.s3.amazonaws.com/42456996/40583700-d08d-11e9-8ae2-c58bfd9e3989?X-Amz-Algorithm=AWS4-HMAC-SHA256&X-Amz-Credential=AKIAIWNJYAX4CSVEH53A%2F20210109%2Fus-east-1%2Fs3%2Faws4_request&X-Amz-Date=20210109T055756Z&X-Amz-Expires=300&X-Amz-Signature=59aba230e1515dae842e6cec900c28ea2747948b732ab1f4fee65c803397d4a9&X-Amz-SignedHeaders=host&actor_id=22340625&key_id=0&repo_id=42456996&response-content-disposition=attachment%3B%20filename%3DGCMW-1.20.0.exe&response-content-type=application%2Foctet-stream

你可能感兴趣的:(经验分享,经验分享)