gpg-connect-agent: command not found

Have You tried accessing the binary with the full path?

Maybe Your $PATH variable doesn't contain the default paths? echo $PATH should give something like:

[root@server ~]# echo $PATH
/usr/local/sbin:/usr/local/bin:/sbin:/bin:/usr/sbin:/usr/bin:/root/bin

If it's empty, You may set the PATH variable with this command

export PATH="/usr/local/sbin:/usr/local/bin:/sbin:/bin:/usr/sbin:/usr/bin:/root/bin"

On CentOS possible default full paths are:

/usr/bin/gpg-connect-agent - from package: gnupg2

You may install the required package with command yum install {package}

On Debian possible default full paths are:

/usr/bin/gpg-connect-agent - from package: gnupg-agent

You may install the required package with command apt-get install {package}
Error in other languages:
gpg-connect-agent: bevel nie gevind nie
gpg-connect-agent: comandă negăsită
gpg-connect-agent: comando não encontrado
gpg-connect-agent: commande introuvable
gpg-connect-agent: command not found
gpg-connect-agent: käsku ei ole
gpg-connect-agent: không tìm thấy lệnh
gpg-connect-agent: komanda nerasta
gpg-connect-agent: Kommando nicht gefunden.
gpg-connect-agent: kommandot finns inte
gpg-connect-agent: komut yok
gpg-connect-agent: nie znaleziono polecenia
gpg-connect-agent: níor aimsíodh an t-ordú
gpg-connect-agent: no se encontró la orden
gpg-connect-agent: no s'ha trobat l'ordre
gpg-connect-agent: opdracht niet gevonden
gpg-connect-agent: parancs nem található
gpg-connect-agent: perintah tidak ditemukan
gpg-connect-agent: príkaz nenájdený
gpg-connect-agent: příkaz nenalezen
gpg-connect-agent: команда не найдена
gpg-connect-agent: командата не е открита
gpg-connect-agent: 命令找不到
gpg-connect-agent: コマンドが見つかりません