{"action":"created","issue":{"url":"https://api.github.com/repos/gogits/gogs/issues/2551","repository_url":"https://api.github.com/repos/gogits/gogs","labels_url":"https://api.github.com/repos/gogits/gogs/issues/2551/labels{/name}","comments_url":"https://api.github.com/repos/gogits/gogs/issues/2551/comments","events_url":"https://api.github.com/repos/gogits/gogs/issues/2551/events","html_url":"https://github.com/gogits/gogs/issues/2551","id":131302028,"number":2551,"title":"SSH on Windows with OpenSSH failing","user":{"login":"rjrudman","id":709585,"avatar_url":"https://avatars.githubusercontent.com/u/709585?v=3","gravatar_id":"","url":"https://api.github.com/users/rjrudman","html_url":"https://github.com/rjrudman","followers_url":"https://api.github.com/users/rjrudman/followers","following_url":"https://api.github.com/users/rjrudman/following{/other_user}","gists_url":"https://api.github.com/users/rjrudman/gists{/gist_id}","starred_url":"https://api.github.com/users/rjrudman/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/rjrudman/subscriptions","organizations_url":"https://api.github.com/users/rjrudman/orgs","repos_url":"https://api.github.com/users/rjrudman/repos","events_url":"https://api.github.com/users/rjrudman/events{/privacy}","received_events_url":"https://api.github.com/users/rjrudman/received_events","type":"User","site_admin":false},"labels":[{"url":"https://api.github.com/repos/gogits/gogs/labels/feedback%20needed","name":"feedback needed","color":"fbca04"}],"state":"closed","locked":false,"assignee":null,"milestone":{"url":"https://api.github.com/repos/gogits/gogs/milestones/9","html_url":"https://github.com/gogits/gogs/milestones/0.9.0","labels_url":"https://api.github.com/repos/gogits/gogs/milestones/9/labels","id":1226114,"number":9,"title":"0.9.0","description":"","creator":{"login":"Unknwon","id":2946214,"avatar_url":"https://avatars.githubusercontent.com/u/2946214?v=3","gravatar_id":"","url":"https://api.github.com/users/Unknwon","html_url":"https://github.com/Unknwon","followers_url":"https://api.github.com/users/Unknwon/followers","following_url":"https://api.github.com/users/Unknwon/following{/other_user}","gists_url":"https://api.github.com/users/Unknwon/gists{/gist_id}","starred_url":"https://api.github.com/users/Unknwon/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/Unknwon/subscriptions","organizations_url":"https://api.github.com/users/Unknwon/orgs","repos_url":"https://api.github.com/users/Unknwon/repos","events_url":"https://api.github.com/users/Unknwon/events{/privacy}","received_events_url":"https://api.github.com/users/Unknwon/received_events","type":"User","site_admin":false},"open_issues":165,"closed_issues":154,"state":"open","created_at":"2015-07-26T11:28:23Z","updated_at":"2016-02-05T22:19:50Z","due_on":null,"closed_at":null},"comments":8,"created_at":"2016-02-04T10:19:49Z","updated_at":"2016-02-06T02:40:15Z","closed_at":"2016-02-05T08:05:31Z","body":"Hi,\r\n\r\nI've spent the last few hours trying to get this working. I've installed OpenSSH on a windows machine, and that all works perfectly when manually adding keys into authorized_keys, etc.\r\n\r\nGoing through the Gogs UI and adding the same key produces this file:\r\n\r\n`command=\"c:/Gogs/gogs.exe serv key-1 --config='c:/Gogs/custom/conf/app.ini'\",no-port-forwarding,no-X11-forwarding,no-agent-forwarding,no-pty ssh-rsa */MyKey/*  `\r\n\r\nNow, running the command: `c:/Gogs/gogs.exe serv key-1 --config='c:/Gogs/custom/conf/app.ini'` on the remote machine works fine, giving the welcome message \"Hi there, you've successfully authenticated\", etc.\r\n\r\nsshing into and pushing both fail:\r\n\r\n\r\n```\r\n$ ssh -v rudman@192.168.1.176\r\nOpenSSH_7.1p1, OpenSSL 1.0.2d 9 Jul 2015\r\ndebug1: Reading configuration data /etc/ssh/ssh_config\r\ndebug1: Connecting to 192.168.1.176 [192.168.1.176] port 22.\r\ndebug1: Connection established.\r\ndebug1: identity file /c/Users/Rob/.ssh/id_rsa type 1\r\ndebug1: key_load_public: No such file or directory\r\ndebug1: identity file /c/Users/Rob/.ssh/id_rsa-cert type -1\r\ndebug1: key_load_public: No such file or directory\r\ndebug1: identity file /c/Users/Rob/.ssh/id_dsa type -1\r\ndebug1: key_load_public: No such file or directory\r\ndebug1: identity file /c/Users/Rob/.ssh/id_dsa-cert type -1\r\ndebug1: key_load_public: No such file or directory\r\ndebug1: identity file /c/Users/Rob/.ssh/id_ecdsa type -1\r\ndebug1: key_load_public: No such file or directory\r\ndebug1: identity file /c/Users/Rob/.ssh/id_ecdsa-cert type -1\r\ndebug1: key_load_public: No such file or directory\r\ndebug1: identity file /c/Users/Rob/.ssh/id_ed25519 type -1\r\ndebug1: key_load_public: No such file or directory\r\ndebug1: identity file /c/Users/Rob/.ssh/id_ed25519-cert type -1\r\ndebug1: Enabling compatibility mode for protocol 2.0\r\ndebug1: Local version string SSH-2.0-OpenSSH_7.1\r\ndebug1: Remote protocol version 2.0, remote software version OpenSSH_7.1p1 Microsoft_Win32_port_with_VS\r\ndebug1: match: OpenSSH_7.1p1 Microsoft_Win32_port_with_VS pat OpenSSH* compat 0x04000000\r\ndebug1: Authenticating to 192.168.1.176:22 as 'rudman'\r\ndebug1: SSH2_MSG_KEXINIT sent\r\ndebug1: SSH2_MSG_KEXINIT received\r\ndebug1: kex: server->client chacha20-poly1305@openssh.com <implicit> none\r\ndebug1: kex: client->server chacha20-poly1305@openssh.com <implicit> none\r\ndebug1: expecting SSH2_MSG_KEX_ECDH_REPLY\r\ndebug1: Server host key: ecdsa-sha2-nistp256 SHA256:IM2wIjS1RZ78HmZsBDQmE4H2Ju/OsH9nDx0jMQbtUls\r\ndebug1: Host '192.168.1.176' is known and matches the ECDSA host key.\r\ndebug1: Found key in /c/Users/Rob/.ssh/known_hosts:1\r\ndebug1: SSH2_MSG_NEWKEYS sent\r\ndebug1: expecting SSH2_MSG_NEWKEYS\r\ndebug1: SSH2_MSG_NEWKEYS received\r\ndebug1: Roaming not allowed by server\r\ndebug1: SSH2_MSG_SERVICE_REQUEST sent\r\ndebug1: SSH2_MSG_SERVICE_ACCEPT received\r\ndebug1: Authentications that can continue: publickey,password,keyboard-interactive\r\ndebug1: Next authentication method: publickey\r\ndebug1: Offering RSA public key: /c/Users/Rob/.ssh/id_rsa\r\ndebug1: Server accepts key: pkalg ssh-rsa blen 279\r\ndebug1: Authentication succeeded (publickey).\r\nAuthenticated to 192.168.1.176 ([192.168.1.176]:22).\r\ndebug1: channel 0: new [client-session]\r\ndebug1: Requesting no-more-sessions@openssh.com\r\ndebug1: Entering interactive session.\r\ndebug1: client_input_global_request: rtype hostkeys-00@openssh.com want_reply 0\r\ndebug1: Remote: Forced command.\r\ndebug1: Remote: Port forwarding disabled.\r\ndebug1: Remote: X11 forwarding disabled.\r\ndebug1: Remote: Agent forwarding disabled.\r\ndebug1: Remote: Pty allocation disabled.\r\nPTY allocation request failed on channel 0\r\ndebug1: client_input_channel_req: channel 0 rtype exit-status reply 0\r\ndebug1: client_input_channel_req: channel 0 rtype eow@openssh.com reply 0\r\ndebug1: channel 0: free: client-session, nchannels 1\r\nConnection to 192.168.1.176 closed.\r\nTransferred: sent 3448, received 2872 bytes, in 0.1 seconds\r\nBytes per second: sent 30024.1, received 25008.5\r\ndebug1: Exit status 0\r\n\r\n```\r\n\r\nThere are no logs whatsoever output from gogs, and there are no logs in windows event viewer for OpenSSH (and none in the log.txt file either).\r\n\r\nAny ideas?"},"comment":{"url":"https://api.github.com/repos/gogits/gogs/issues/comments/180661319","html_url":"https://github.com/gogits/gogs/issues/2551#issuecomment-180661319","issue_url":"https://api.github.com/repos/gogits/gogs/issues/2551","id":180661319,"user":{"login":"rjrudman","id":709585,"avatar_url":"https://avatars.githubusercontent.com/u/709585?v=3","gravatar_id":"","url":"https://api.github.com/users/rjrudman","html_url":"https://github.com/rjrudman","followers_url":"https://api.github.com/users/rjrudman/followers","following_url":"https://api.github.com/users/rjrudman/following{/other_user}","gists_url":"https://api.github.com/users/rjrudman/gists{/gist_id}","starred_url":"https://api.github.com/users/rjrudman/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/rjrudman/subscriptions","organizations_url":"https://api.github.com/users/rjrudman/orgs","repos_url":"https://api.github.com/users/rjrudman/repos","events_url":"https://api.github.com/users/rjrudman/events{/privacy}","received_events_url":"https://api.github.com/users/rjrudman/received_events","type":"User","site_admin":false},"created_at":"2016-02-06T02:40:15Z","updated_at":"2016-02-06T02:40:15Z","body":"@Unknwon There was no output at all on the gogs console (using the latest binaries - amd | ZIP w/ mws). I wasn't able to find any logs, unfortunately. Though it does definitely seem that it never executed the `gogs.exe`"}}