CodeCommit Git Windows fatal: Failed to write item to store [0x6c6]

2

Is there a solution for the fatal message 0x6c6 that shows up in git-bash for Windows? It's annoying since it appears that operations continue normally other than the "fatal" part. My coworkers using Windows experience the same problem. I've included the full error along with the GIT_TRACE=1 info.

09:45:39.933420 run-command.c:654       trace: run_command: 'git credential-manager-core store'
09:45:40.042896 exec-cmd.c:237          trace: resolved executable dir: C:/Users/xxxxxxxx/AppData/Local/Programs/Git/mingw64/libexec/git-core
09:45:40.042896 git.c:748               trace: exec: git-credential-manager-core store
09:45:40.042896 run-command.c:654       trace: run_command: git-credential-manager-core store
fatal: Failed to write item to store. [0x6c6]
fatal: The array bounds are invalid

This is a newly setup Win10 Pro system. I'm using the following: git 2.36.1, Python 3.10.4, git-remote-codecommit 1.16, and we use a non AWS identity provider for SSO.

$ aws --version
aws-cli/2.6.3 Python/3.9.11 Windows/10 exe/AMD64 prompt/off

Here's ~/.gitconfig on the affected system.

[credential "url pointing to aws codecommit"]
    provider = generic
[protocol "codecommit"]
    allow = always

Here's part of the repo .git/config

[core]
    repositoryformatversion = 0
    filemode = false
    bare = false
    logallrefupdates = true
    symlinks = false
    ignorecase = true
[submodule]
    active = .
[remote "origin"]
    url = codecommit::region://repo-name
    fetch = +refs/heads/*:refs/remotes/origin/*
[branch "master"]
    remote = origin
    merge = refs/heads/master

Linux systems don't have this problem.

hubbs
asked 2 years ago6536 views
4 Answers
1

Don't know if this will help as we are using SSO through AWS config files, but I uninstalled Git and then reinstalled Git but did not install the credentials manager. After closing and re-opening VS Code, I run git pull on our repo and got none of the fatal errors.

answered 2 years ago
  • When you say you did not install the credentials manager, do you mean the git credentials manager provided by MS or the one provided by AWS for CodeCommit? thank you!

  • This worked for me. I tried the suggestion of removing the credential helper first and restarting VSCode, and it didn't have any affect. I needed to re-run the Git installer and not select the Credential Helper in the install options, and it removed the previous and reinstalled without the Cred Helper and all worked. Thanks!

0

This answer assumes the problem is an installed git-credential-manager-core (the most recent generation of git-credential-manager from MS). This could be because of a need for other repos that are not CodeCommit. The original poster's question had a trace output from git that shows the invocation of the git-credential-manager-core store command. If GCM is installed, it cannot help with CodeCommit stuff and its automatic invocation causes the error messages.

In that case, in your CodeCommit repo that should not use GCM, do following:

In the local .git/config file (**MAKE A BACKUP COPY OF THE FILE ** before editing!) of the repo involved, add

[credential]
   helper=""

Details under which this solution works (my setup):

  • Win11
  • Git version 2.39.1.windows.1
  • Git GCM version 2.0.886+ea93cb5158
  • AWS git-remote-codecommit 1.16
answered a year ago
  • Rather than manually editing the .git/config file, you can achieve the same result using the following command:

    git config credential.helper ""
  • OP of the answer here (but I cannot figure out how to login in under a prior re:Post id, now that AWS has switched to builder logins): Strongly agree with @Simon Heather. I should have done it that way (used the git CLI, not edited the config file).

0

To fix the error below in Windows when cloning a repository from CodeCommit using federated access, temporary credentials, or a web identity provider:

fatal: Failed to write item to store. [0x6c6]
fatal: The array bounds are invalid

You just reinstall git by changing “Choose a credential helper” from “Git Credential Manager” to None. The recommended method is to install and use the git-remote-codecommit utility, as stated below:

https://docs.aws.amazon.com/codecommit/latest/userguide/setting-up-https-windows.html

Although the credential helper is a supported method for connecting to CodeCommit using federated access, an identity provider, or temporary credentials, the recommended method is to install and use the git-remote-codecommit utility. For more information, see Setup steps for HTTPS connections to AWS CodeCommit with git-remote-codecommit.

answered a year ago
-1

This is an issue with the git credential manager. You will need to update to the latest release. I recently confirmed this on a windows machine.

AWS
answered 2 years ago
  • I'm already running the lastest version of everything. Switching the credential manager to wincredman gives the same error and using dpapi causes a different error about paths.

  • Has this been answered? I'm having the same issue using SSO, I can successfully pull and push using git codecommit with VS Code but I get two fatal errors: fatal: Failed to write item to store. [0x6c6] fatal: The array bounds are invalid I'm running the latest version of everything and have downloaded git credential manager.

You are not logged in. Log in to post an answer.

A good answer clearly answers the question and provides constructive feedback and encourages professional growth in the question asker.

Guidelines for Answering Questions