Thanks for the tips @eskimo
I confirmed that copying the code with rsync bypassed the Gatekeeper and allowed the it to run.
Since I do eventually want to have it downloadable by others, I followed your link and updated the Apple Worldwide Developer Relations Intermediate Certificate and reset the trust settings which I had been playing with. That has enabled me to codesign the application without any errors, so definitely a step forward - thanks.
However after downloading the app with browser from a web site, the app still cannot run on another machine. Interestingly, using curl to download the same app from the same web site results in an app that runs normally. Checking both downloads with ls -l@ shows
com.apple.macl -1
com.apple.metadata:kMDItemWhereFroms -1
com.apple.quarantine -1
for the version downloaded with a browser, so looks like there's more to do than just codesigning the app. I'll look into that some more.
Since my question was about codesigning, I'll mark this as solved. Thanks again.
chris