I am trying to push changes to a remote repository on Github from Qt Creator, but it fails with

Qt Code:
  1. 21:03 Running in /Users/.../...: /usr/bin/git push
  2. 129:328: execution error: Can’t get application missing value of «script». (-1728)
  3. error: unable to read askpass response from '/usr/libexec/ssh-askpass'
  4. fatal: could not read Username for 'https://github.com': Device not configured
  5. The command "/usr/bin/git" terminated with exit code 128.
To copy to clipboard, switch view to plain text mode 

I am using a MacBook with macOS Sierra 10.12.6. The procedure works perfectly on my iMac (desktop) running the same OS.

For some reason the MacBook as supplied does not have ssh-askpass installed, so I installed it following the instructions at https://github.com/markcarver/mac-ssh-askpass. This installs the following AppleScript code in /usr/libexec/:

Qt Code:
  1. #!/bin/bash
  2. # Script: ssh-askpass
  3. # Author: Mark Carver
  4. # Created: 2011-09-14
  5. # Licensed under GPL 3.0
  7. # A ssh-askpass command for Mac OS X
  8. # Based from author: Joseph Mocker, Sun Microsystems
  9. # http://blogs.oracle.com/mock/entry/and_now_chicken_of_the
  11. # To use this script:
  12. # Install this script running INSTALL as root
  13. #
  14. # If you plan on manually installing this script, please note that you will have
  15. # to set the following variable for SSH to recognize where the script is located:
  16. # export SSH_ASKPASS="/path/to/ssh-askpass"
  19. TEXT="$(whoami)'s password:";
  20. IFS=$(printf "\n");
  21. CODE=("on GetCurrentApp()");
  22. CODE=(${CODE[*]} "tell application \"System Events\" to get short name of first process whose frontmost is true");
  23. CODE=(${CODE[*]} "end GetCurrentApp");
  24. CODE=(${CODE[*]} "tell application GetCurrentApp()");
  25. CODE=(${CODE[*]} "activate");
  26. CODE=(${CODE[*]} "display dialog \"${@:-$TEXT}\" default answer \"\" with title \"${TITLE}\" with icon caution with hidden answer");
  27. CODE=(${CODE[*]} "text returned of result");
  28. CODE=(${CODE[*]} "end tell");
  29. SCRIPT="/usr/bin/osascript"
  30. for LINE in ${CODE[*]}; do
  31. SCRIPT="${SCRIPT} -e $(printf "%q" "${LINE}")";
  32. done;
  33. eval "${SCRIPT}";
To copy to clipboard, switch view to plain text mode 

To do this I had to disable SIP (restart in recovery mode and execute 'csrutil disable' from the terminal). I then changed the permissions on the ssh-askpass file to make it executable, stored its path (/usr/libexec/ssh-askpass) in Qt Creator > Preferences > Version Control, and for good measure added the 'export SSH_ASKPASS' setting to my .bash_profile as recommended.

I checked the installation by running ssh-askpass from the command line and it behaves correctly, requesting and then returning a password. However, when it is invoked from the Qt Creator menu (Tools > Git > Remote Repository > Push) in fails as described above.

I would be very grateful for any help with this.