I was facing a similar error. However, in my case the commits were working just fine, but I was getting the following error message all the time:
fatal: Failed to write item to store. [0x6c6]
fatal: The array bounds are invalid
My situation:
- Using git-credential-manager from MS because I have a lot of Azure DevOps git repos.
- But still needing an occasional CodeCommit repo. In this case, I need to make sure the git-credential-manager is not invoked when I run git commands on a CodeCommit repo.
- I happen to be using AWS sso (now known as IAM Identity Center) to authenticate to CodeCommit, not an IAM user.
My Usual use of GCM was the point of failure. Basically, it seems like CodeCommit repos need to be told not to even try a GCM call.
Solution
In the local .git/config (MAKE A BACKUP COPY OF FILE BEFORE EDITING) for the repo involved, I add:
[credential]
helper=""
The error message goes away.
Details of my configuration
- Win11
- Git version 2.39.1.windows.1
- Git GCM version 2.0.886+ea93cb5158
- AWS git-remote-codecommit 1.16