Not Your Dad's IT

Updated Solutions to Classic Challenges

A personal website dedicated to helping IT professionals review where we've been, where we are, and maybe where we are headed.

  • Blog
  • About
git_and_codecommit_logo_v1.png

How To: Install Git for use with Amazon CodeCommit

April 10, 2018 by Nathaniel AVERY in Install, Tip, Bugs

Git for Windows is a powerful tool for interacting with CI/CD pipelines.  There are specific components that should be avoided during the installation when working with Amazon AWS’s CodeCommit service.  More Specifically, the Git Credential Manager component should not be installed if you plan to use Git for Windows with Amazon's CodeCommit source code repository.

I ran into access denied errors a while back with Git and CodeCommit.  I'd read the advice on Amazon's troubleshooting website (https://docs.aws.amazon.com/codecommit/latest/userguide/troubleshooting-ch.html) but to be honest, it didn't click with me.  It wasn't until I had the errors and re-read the instructions, that it started to set in that I needed to reinstall Git and change the option.

Git_Credential_Manager_01.png

While this option looks useful and is a default, it isn't compatible with AWS CodeCommit.

I recommend installing Git for Windows using an inf file to simplify the matter.

Example git.inf

Lang=default
Dir=C:\Program Files\GitGroup=GitNoIcons=0
SetupType=default
Components=ext,ext\shellhere,ext\guihere,gitlfs,assoc,assoc_sh,autoupdate
Tasks=
EditorOption=Notepad++
PathOption=Cmd
SSHOption=OpenSSH
CURLOption=OpenSSL
CRLFOption=CRLFAlways
BashTerminalOption=ConHost
PerformanceTweaksFSCache=Enabled
UseCredentialManager=Disabled EnableSymlinks=Disabled

This file can then be called on the command line to install

Git_Credential_Manager_02.png

A full list of Git for Windows command line options is below.  These options can be called to highly customize the installation process.

Git_Credential_Manager_03.png
April 10, 2018 /Nathaniel AVERY
aws, CodeCommit, Git
Install, Tip, Bugs
  • Newer
  • Older

Powered by Squarespace