How to get rid of firewall "accept incoming connections" dialog?
sudo codesign --force --deep --sign - /path/to/application.app


I've never had to create a certificate using this method.

If that doesn't help, try without --deep and without the trailing slash:

sudo codesign --force --sign - /path/to/application.app




Note, just to make it clearer: After having applied the signature, start the app, accept incoming connections one last time, then quit and start again to verify that the request is gone.