Gerrit scp en Windows 8.1: permiso denegado (pero la testing ssh parece ser buena)

Estoy intentando saber por qué tengo un layout de permiso en el command scp para agregar automáticamente la línea de cambio de ID para gerrit.

Todo lo que he encontrado en Internet y StackOverflow sobre esto es sobre un problema con ssh (como se explica aquí: Permiso denegado (key pública) )

Pero lo extraño es que todo parece estar bien al intentar una connection ssh:

C:\Development\demo-project\.git\hooks>ssh -vv -p 29418 [email protected] OpenSSH_4.6p1, OpenSSL 0.9.8e 23 Feb 2007 debug2: ssh_connect: needpriv 0 debug1: Connecting to gerrit.domain.net [5.135.150.179] port 29418. debug1: Connection established. debug1: identity file /c/Users/Ga\303\253tan/.ssh/identity type -1 debug2: key_type_from_name: unknown key type '-----BEGIN' debug2: key_type_from_name: unknown key type 'Proc-Type:' debug2: key_type_from_name: unknown key type 'DEK-Info:' debug2: key_type_from_name: unknown key type '-----END' debug2: key_type_from_name: unknown key type '----' debug2: key_type_from_name: unknown key type 'Comment:' debug2: key_type_from_name: unknown key type '----' debug1: identity file /c/Users/Ga\303\253tan/.ssh/id_rsa type -1 debug1: identity file /c/Users/Ga\303\253tan/.ssh/id_dsa type -1 debug1: Remote protocol version 2.0, remote software version GerritCodeReview_2.8.5 (SSHD-CORE-0.11.0) debug1: no match: GerritCodeReview_2.8.5 (SSHD-CORE-0.11.0) debug1: Enabling compatibility mode for protocol 2.0 debug1: Local version string SSH-2.0-OpenSSH_4.6 debug2: fd 3 setting O_NONBLOCK debug1: SSH2_MSG_KEXINIT sent debug1: SSH2_MSG_KEXINIT received debug2: kex_parse_kexinit: diffie-hellman-group-exchange-sha256,diffie-hellman-group-exchange-sha1,diffie-hellman-group14-sha1,diffie-hellman-group1-sha1 debug2: kex_parse_kexinit: ssh-rsa,ssh-dss debug2: kex_parse_kexinit: aes128-cbc,3des-cbc,blowfish-cbc,cast128-cbc,arcfour128,arcfour256,arcfour,aes192-cbc,aes256-cbc,[email protected],aes128-ctr,aes192-ctr,aes256-ctr debug2: kex_parse_kexinit: aes128-cbc,3des-cbc,blowfish-cbc,cast128-cbc,arcfour128,arcfour256,arcfour,aes192-cbc,aes256-cbc,[email protected],aes128-ctr,aes192-ctr,aes256-ctr debug2: kex_parse_kexinit: hmac-md5,hmac-sha1,hmac-ripemd160,hmac-ripemd160[email protected],hmac-sha1-96,hmac-md5-96 debug2: kex_parse_kexinit: hmac-md5,hmac-sha1,hmac-ripemd160,[email protected],hmac-sha1-96,hmac-md5-96 debug2: kex_parse_kexinit: none,[email protected],zlib debug2: kex_parse_kexinit: none,[email protected],zlib debug2: kex_parse_kexinit: debug2: kex_parse_kexinit: debug2: kex_parse_kexinit: first_kex_follows 0 debug2: kex_parse_kexinit: reserved 0 debug2: kex_parse_kexinit: diffie-hellman-group14-sha1,diffie-hellman-group1-sha1 debug2: kex_parse_kexinit: ssh-rsa,ssh-dss debug2: kex_parse_kexinit: aes128-cbc,3des-cbc,blowfish-cbc,aes192-cbc,aes256-cbc debug2: kex_parse_kexinit: aes128-cbc,3des-cbc,blowfish-cbc,aes192-cbc,aes256-cbc debug2: kex_parse_kexinit: hmac-md5,hmac-sha1,hmac-md5-96,hmac-sha1-96 debug2: kex_parse_kexinit: hmac-md5,hmac-sha1,hmac-md5-96,hmac-sha1-96 debug2: kex_parse_kexinit: none debug2: kex_parse_kexinit: none debug2: kex_parse_kexinit: debug2: kex_parse_kexinit: debug2: kex_parse_kexinit: first_kex_follows 0 debug2: kex_parse_kexinit: reserved 0 debug2: mac_init: found hmac-md5 debug1: kex: server->client aes128-cbc hmac-md5 none debug2: mac_init: found hmac-md5 debug1: kex: client->server aes128-cbc hmac-md5 none debug2: dh_gen_key: priv key bits set: 134/256 debug2: bits set: 993/2048 debug1: sending SSH2_MSG_KEXDH_INIT debug1: expecting SSH2_MSG_KEXDH_REPLY debug1: Host '[gerrit.domain.net]:29418' is known and matches the RSA host key. debug1: Found key in /c/Users/Ga\303\253tan/.ssh/known_hosts:1 debug2: bits set: 1079/2048 debug1: ssh_rsa_verify: signature correct debug2: kex_derive_keys debug2: set_newkeys: mode 1 debug1: SSH2_MSG_NEWKEYS sent debug1: expecting SSH2_MSG_NEWKEYS debug2: set_newkeys: mode 0 debug1: SSH2_MSG_NEWKEYS received debug1: SSH2_MSG_SERVICE_REQUEST sent debug2: service_accept: ssh-userauth debug1: SSH2_MSG_SERVICE_ACCEPT received debug2: key: /c/Users/Ga\303\253tan/.ssh/identity (0x0) debug2: key: /c/Users/Ga\303\253tan/.ssh/id_rsa (0x0) debug2: key: /c/Users/Ga\303\253tan/.ssh/id_dsa (0x0) debug1: Authentications that can continue: publickey debug1: Next authentication method: publickey debug1: Trying private key: /c/Users/Ga\303\253tan/.ssh/identity debug1: Trying private key: /c/Users/Ga\303\253tan/.ssh/id_rsa debug1: PEM_read_PrivateKey failed debug1: read PEM private key done: type <unknown> Enter passphrase for key '/c/Users/Gahfy/.ssh/id_rsa': debug1: read PEM private key done: type RSA debug2: we sent a publickey packet, wait for reply debug1: Authentication succeeded (publickey). debug1: channel 0: new [client-session] debug2: channel 0: send open debug1: Entering interactive session. debug2: callback start debug2: client_session2_setup: id 0 debug2: channel 0: request pty-req confirm 0 debug2: channel 0: request shell confirm 0 debug2: fd 3 setting TCP_NODELAY debug2: callback done debug2: channel 0: open confirm rwindow 2097152 rmax 32768 debug2: channel 0: rcvd ext data 293 **** Welcome to Gerrit Code Review **** Hi Gahfy, you have successfully connected over SSH. Unfortunately, interactive shells are disabled. To clone a hosted Git repository, use: git clone ssh://[email protected]:29418/REPOSITORY_NAME.git debug2: channel 0: written 293 to efd 6 debug2: channel 0: rcvd eof debug2: channel 0: output open -> drain debug2: channel 0: obuf empty debug2: channel 0: close_write debug2: channel 0: output drain -> closed debug1: client_input_channel_req: channel 0 rtype exit-status reply 0 debug2: channel 0: rcvd close debug2: channel 0: close_read debug2: channel 0: input open -> closed debug2: channel 0: almost dead debug2: channel 0: gc: notify user debug2: channel 0: gc: user detached debug2: channel 0: send close debug2: channel 0: is dead debug2: channel 0: garbage collecting debug1: channel 0: free: client-session, nchannels 1 Connection to gerrit.domain.net closed. debug1: Transfernetworking: stdin 0, stdout 0, stderr 45 bytes in 0.7 seconds debug1: Bytes per second: stdin 0.0, stdout 0.0, stderr 69.1 debug1: Exit status 127 

Pero cuando bash el command scp:

 C:\Development\demo-project\.git\hooks>scp -p -P 29418 gerrit.domain.net:hooks/commit-msg .git/hooks/ Enter passphrase for key '/c/Users/Gahfy/.ssh/id_rsa': Permission denied (publickey). 

¿Puede saber el motivo de esta falla?

Gracias.

Creo que echas de less el userId del host. Intente agregar su Id de usuario de Gerrit al command:

 scp -P 29418 <userId>@gerrit.domain.net:hooks/commit-msg .git/hooks/