/ ServiceNow

ServiceNow Git 'Checksum' Errors

So you are a developer that works in ServiceNow? You love the feature of linking to a Git repositotity for your applications. However, you miss the functiinialy of running a true 'git flow' on your ServiceNow git because of the crazy 'checksum.txt' might not match as the internal git control doesn't allow mergering? So was I.

After a few attempts of doing my own develop cycle with Gitflow, I had that dreaded 'checksum' error and I had to revert, go back. Nightmare. So during a previous ticket working with HI, I did some more digging. Turns out you can do git flow and all your doing is running those commands locally. A problem occurers when you are merging into another branch. The new 'checksum' comes over but the 'checksum' that ServiceNow is looking for is wrong. It has to match what is in the database otherwise it's futitle to refresh or change branches within ServiceNow.

You can go about this two ways:

Way 1

  1. Delete the application.
  2. Delete any reference to the git repo in the sys_repo_config table.
  3. Then re-import you repository.

This way the 'checksum' generated from the merge is correct for all the branches. The reason this happens is because 'ServiceNow' doesn't know the new 'checksum' from a merged branch into another one. Another user posted this way, and it seems to be the most safe to do so.

Way 2

  1. Modify the current_ref field to match the SHA1 of the commit of the target branch you are trying to change to.
  2. Then change to that branch and/or do a 'Apply Remote Changes'

Then you should be fine to continue to work.

As awlays, this one is differntly at our OWN RISK, but it's a risk that I take so that I can develop different features on seperate branches so that code does not get muddled.

Shane

Shane

Shane is the founder and author of 'the rabbit hole'. By day, Shane is a System and Network Engineer living and working in the NYC area. Free time includes movies, escaping to the non-tech world.

Read More