5

After running

pip install --upgrade awsebcli

I get the following error when trying to do

eb deploy

Could not push code to the CodeCommit repository: ERROR: CommandError - An error occurred while handling git command. Error code: 128 Error: fatal: 'codecommit-origin dev' does not appear to be a git repository fatal: Could not read from remote repository.

Please make sure you have the correct access rights and the repository exists.

I can't figure out why that happened. It seems like the connection to the automatically generated repository codecommit-origin is not working anymore.

In the meantime, I am forced to do the following in order to update the code on Elastic Beanstalk:

eb codesource local

But that's not a long-term solution as it deactivates the automatic CodeCommit (git push).

Do you have any idea how to solve that issue?

eagle28
  • 896
  • 10
  • 19
  • 1
    What do the debug logs (`eb deploy --debug` show)? Also, are you facing this problem with an older version of `awsebcli` as well? – progfan Feb 12 '18 at 18:22
  • I'm also curious to know whether the correct remote is actually listed in the `.git/config` file of your local repository. – progfan Feb 12 '18 at 20:20
  • I'm having the same issue. – Webucator Feb 13 '18 at 03:08
  • Last line of the debug shows: lib/python2.7/site-packages/ebcli/operations/commonops.py", line 785, in create_codecommit_app_version raise e /// then it says "Please make sure you have the correct access rights and the repository exists." but the AWS user has full permission to all CodeCommit repositories – eagle28 Feb 13 '18 at 09:55
  • And the correct remote is listed when I do: "git remote -v" – eagle28 Feb 13 '18 at 09:57
  • 1
    Okay, thanks. This looks like a bug, as also indicated in the other responses. – progfan Feb 13 '18 at 23:35

1 Answers1

4

It happened to me when I upgraded the last version of awsebcli 3.12.2, perhaps because it introduced the following (changelog):

Fixed local-remote inconsistency observed after deployments using CodeCommit

I don't fully understand what is happening but I would suggest that you revert to the previous version with

pip install -Iv awsebcli==3.12.1

This has fixed my problem and I can deploy with CodeCommit again

Matthieu
  • 610
  • 7
  • 16