4

i get the following error when i git pull from an aws repo using codecommit:

git fetch fatal: Failed to write item to store. [0x6c6] fatal: The array bounds are invalid git commit works but after a git push my changes dont persist on the remote repo

b bundi
  • 74
  • 1
  • 7

2 Answers2

1

Hi All I was also facing the same issue, in my case we have AWS federated access account. Where I was using below commands for cloning. Due to this I am also facing error in Visual Studio 2019 while pull and push.

Command

git clone codecommit::us-east-1://myrepository

Error

Cloning into 'myrepository'...

fatal: Failed to write item to store. [0x6c6]

fatal: The array bounds are invalid

Solution

I took the latest version of The "Git Credential manager for Window" exe, from this URL
https://github.com/Microsoft/Git-Credential-Manager-for-Windows/releases after installing the "Git Credential manager for Window" now set

Open visual studio-> tools-> options->Source control-> Git global setting -> credentials helper-> GCM for Windows.

this resolve the issue for me.

1

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:

  1. Using git-credential-manager from MS because I have a lot of Azure DevOps git repos.
  2. 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.
  3. 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
DWright
  • 9,258
  • 4
  • 36
  • 53