overcommit: Overcommit --sign not working

Here’s what I do on my terminal

> Cyril$ overcommit --sign
Updating signature for configuration file...
> Cyril$ git commit -m "overcommit stuff"
Unable to load configuration from '/[...]/.overcommit.yml': Signature of configuration file has changed!
Run `overcommit --sign` once you've verified the configuration changes.

This happened first after I tried to checkout a branch/commit long before I had added overcommit.

I have tried to

  • Update overcommit
  • Add comments in the overcommit.yml file
  • Add instructions to the overcommit.yaml file

The only fix I found thanks to a previous issue, was to remove the overcommit file, but the I’m having a lot of pain trying to merge/rebase branches

About this issue

  • Original URL
  • State: closed
  • Created 7 years ago
  • Comments: 15 (4 by maintainers)

Most upvoted comments

These steps fixed it for me

  • Uninstall hooks - overcommit --uninstall
  • Uninstall gem(all versions) - gem uninstall overcommit
    • found out I had version 0.41.0 and 0.42.0 installed
  • Install it again via bundle - bundle install
  • Install hooks with force - overcommit --force
  • Sign - overcommit --sign

@texpert Once #505 is merged, your problem should go away. In the meantime,I believe you can use a workaround described in #300:

OVERCOMMIT_DISABLE=1 git rebase master

I had two versions of overcommit installed 0.41.0 and 0.42.0 and Gemfile used the older version. After uninstalling the newer version everything worked.