I have been using Gitk provided by Git provided by Homebrew with success, for several years.
A couple of days ago, it suddenly prompted a security window when called.
I did not allow access, hoping I would be able to change my mind.
Now trying to start Gitk will always cause:
$ gitk --all
Error in startup script: 58:103: execution error: Not authorised to send Apple events to System Events. (-1743)
while executing
"exec osascript -e [format {
tell application "System Events"
set frontmost of processes whose unix id is %d to true
end te..."
invoked from within
"if {[tk windowingsystem] eq "aqua"} {
exec osascript -e [format {
tell application "System Events"
set frontmost of processes ..."
(file "/usr/local/bin/gitk" line 12237)
$ _
I would need to revoke that forbiddance.
I have removed Git and reinstalled:
$ brew remove --force git && brew install git
That didn't solve the case1. Force was used in order to remove all versions.
If I don't fix this, I'd need to get used to either Tig or Sourcetree or some other alternative, with an impact in immediate productivity.
1: After reinstalling, error is the same, just moved to line 12212. That's because I use taint patches on top of official Gitk. As you can see, those patches are unrelated to the cause, so please don't let it make you focus away from the actual issue, which is 100% macOS materials.