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

Git拉取AWS CodeCommit代码时报store: command not found错误

问题根因

该报错是Git调用凭证助手时,先加载了错误配置的store类型凭证助手,执行失败后才成功调用AWS CodeCommit的凭证助手完成拉取操作,因此最终代码拉取正常但会残留报错提示。

解决方案

按以下步骤操作即可消除报错:

  • 第一步:先查看当前全局所有凭证配置,定位错误条目
    执行命令:
    git config --global --list | findstr credential
    输出结果中会包含类似credential.helper=store或者credential.helper=\ store的错误条目,这就是报错来源。
  • 第二步:清空现有全局凭证助手配置
    Git的credential.helper是多值累加配置,需要先清空原有错误值再配置正确条目,执行命令:
    git config --global --unset-all credential.helper
  • 第三步:重新配置正确的CodeCommit凭证助手
    Windows环境下配置需要加引号避免转义问题,依次执行以下两条命令:
    git config --global credential.helper "!aws codecommit credential-helper $@"
    git config --global credential.UseHttpPath true
    
  • 第四步:验证配置正确性
    执行git config --global --edit查看全局.gitconfig文件,确认[credential]段内容如下,无其他多余的helper配置:
    [credential]
        helper = !aws codecommit credential-helper $@
        UseHttpPath = true
    
  • 第五步:验证Git操作
    重新进入项目目录执行git pull,报错即可消失。
补充排查

如果完成上述操作后仍然报错,需检查AWS CLI是否正常安装且已加入系统PATH:

  • 执行aws --version确认可以正常输出版本号
  • 如果提示找不到aws命令,将AWS CLI的安装路径(默认路径为C:\Program Files\Amazon\AWSCLIV2\)添加到系统环境变量PATH后,重启终端即可生效

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

相关产品推荐
方舟 Agent Plan

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

最近更新时间:2026.09.26 08:36:03