I am attempting to push to a remote GitHub repository using Tools > Git > Remote repository > push. This works perfectly from my MacOS Sierra Desktop but fails from my MacBook Sierra (version 10.12.6 -- I don't have access to the desktop version number at the moment). Initially it seemed that the problem was caused by the absence of an ssh-askpass script but I fixed this following the instructions at https://github.com/markcarver/mac-ssh-askpass and https://apple.stackexchange.com/ques...x-10-11/208481.

The appleScript code I'm using for ssh-askpass is

Qt Code:
  1. #!/bin/bash
  2. # Script: ssh-askpass
  3. # Author: Mark Carver
  4. # Created: 2011-09-14
  5. # Licensed under GPL 3.0
  6.  
  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
  10.  
  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"
  17.  
  18. TITLE="${SSH_ASKPASS_TITLE:-SSH}";
  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 

I set the path to ssh-askpass in Qt Creator > Preferences > Version control, set the permissions to executable, and checked it from the command line. As expected it brought up a dialog requesting a password, and correctly returned the entered password when OK'ed. However, when invoked from the Qt menu it fails with the following output:

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

I am fairly new to MacOS and have no familiarity (so far) with AppleScript, and would be very grateful for any guidance on how to fix this issue. I realise I could set things up to use SSH from the command line, but I would really like to use the built-in mechanism if possible.