Fix AWS git-remote-codecommit SyntaxWarning / Namespace cli_binary_format

Andreas Heissenberger
1 min readMay 5, 2020

Switching from the workaround for the OSX credential Helper 403 Error I tried the AWS git credential helper and could not got it working without fixing some problems.

The Problem

After the installation with `brew install git-remote-codecommit` using git will throw the following warnings:

$ git pull
/usr/local/Cellar/git-remote-codecommit/1.13/libexec/lib/python3.8/site-packages/jmespath/visitor.py:32:
SyntaxWarning: “is” with a literal. Did you mean “==”?
if x is 0 or x is 1:
/usr/local/Cellar/git-remote-codecommit/1.13/libexec/lib/python3.8/site-packages/jmespath/visitor.py:32: SyntaxWarning: “is” with a literal. Did you mean “==”?
if x is 0 or x is 1:
/usr/local/Cellar/git-remote-codecommit/1.13/libexec/lib/python3.8/site-packages/jmespath/visitor.py:34: SyntaxWarning: “is” with a literal. Did you mean “==”?
elif y is 0 or y is 1:
/usr/local/Cellar/git-remote-codecommit/1.13/libexec/lib/python3.8/site-packages/jmespath/visitor.py:34: SyntaxWarning: “is” with a literal. Did you mean “==”?
elif y is 0 or y is 1:
/usr/local/Cellar/git-remote-codecommit/1.13/libexec/lib/python3.8/site-packages/jmespath/visitor.py:260: SyntaxWarning: “is” with a literal. Did you mean “==”?
if original_result is 0:

‘Namespace’ object has no attribute ‘cli_binary_format’
Already up to date.

The problem is related to the outdated versions of `jmespath`and `awscli` bundled with `git-remote-codecommit`.

The Fix

will be fixed when this pull request gets merged: https://github.com/Homebrew/homebrew-core/pull/52424

sudo cp -rp /usr/local/Cellar/awscli/2.0.10/libexec/lib/python3.8/site-packages/awscli /usr/local/Cellar/git-remote-codecommit/1.13/libexec/lib/python3.8/site-packages

sudo cp -rp /usr/local/Cellar/awscli/2.0.10/libexec/lib/python3.8/site-packages/jmespath /usr/local/Cellar/git-remote-codecommit/1.13/libexec/lib/python3.8/site-packages

If the copy breaks check your local versions of awscli (2.0.10) and codecommit (1.13) and adapt the path to your enviroment.

--

--

Andreas Heissenberger

Fast-track professional successful in the design, development and deployment of technology strategies and policy. Experienced leading Internet and IS operations