Solution to "unknown problem with altool" in SD Notary

In case anyone else gets an “unknown problem with altool” in SD Notary, and you don’t want to waste an hour restoring certificates and much more, the solution may be (as it was for me):

sudo xcode-select -r

which reinstalls the command-line tools.