Search code examples
rubygemsruby-overcommit

"Signature of configuration file has changed!" after running ''overcommit --sign"


After installing overcommit and signing the .overcommit.yml local file I still get a 'sign' requirement.

$ overcommit --sign
Updating signature for configuration file...
$ git commit
Unable to load configuration from '/Users/sergii/w/profinda_saas/.overcommit.yml': Signature of configuration file has changed!
Run `overcommit --sign` once you've verified the configuration changes.

Solution

  • The problem is in different versions of overcommit gems. Remove versions that are different from the one that was used to create the .overcommit.yml file. Install the correct version and re-install hooks.

     $ gem uninstall overcommit
     $ gem install overcommit -v 0.46.0 
     $ overcommit --install
     $ overcommit --sign