{"action":"created","issue":{"url":"https://api.github.com/repos/git-for-windows/git/issues/780","repository_url":"https://api.github.com/repos/git-for-windows/git","labels_url":"https://api.github.com/repos/git-for-windows/git/issues/780/labels{/name}","comments_url":"https://api.github.com/repos/git-for-windows/git/issues/780/comments","events_url":"https://api.github.com/repos/git-for-windows/git/issues/780/events","html_url":"https://github.com/git-for-windows/git/issues/780","id":159692032,"number":780,"title":"Git bash refusing ssh connection to github although authentication is successful","user":{"login":"khalid-s","id":7849198,"avatar_url":"https://avatars.githubusercontent.com/u/7849198?v=3","gravatar_id":"","url":"https://api.github.com/users/khalid-s","html_url":"https://github.com/khalid-s","followers_url":"https://api.github.com/users/khalid-s/followers","following_url":"https://api.github.com/users/khalid-s/following{/other_user}","gists_url":"https://api.github.com/users/khalid-s/gists{/gist_id}","starred_url":"https://api.github.com/users/khalid-s/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/khalid-s/subscriptions","organizations_url":"https://api.github.com/users/khalid-s/orgs","repos_url":"https://api.github.com/users/khalid-s/repos","events_url":"https://api.github.com/users/khalid-s/events{/privacy}","received_events_url":"https://api.github.com/users/khalid-s/received_events","type":"User","site_admin":false},"labels":[],"state":"open","locked":false,"assignee":null,"assignees":[],"milestone":null,"comments":3,"created_at":"2016-06-10T18:18:03Z","updated_at":"2016-10-04T15:33:37Z","closed_at":null,"body":"I reproduced this problem on windows 7 both 32 and 64 bits and on both native and VMs. I have no problem at all when using git directly from ubuntu terminal.\r\n\r\nGit-scm would refuse all ssh connections to github due to public key problem.\r\n\r\nI generated a key on a fresh Win 7 32 bits VM\r\n\r\n```\r\nKhalid Sookia@iknsa MINGW32 ~/Downloads\r\n$ ssh-keygen -t rsa -b 4096 -C \"khalidsookia@gmail.com\"\r\nGenerating public/private rsa key pair.\r\nEnter file in which to save the key (/c/Users/Khalid Sookia/.ssh/id_rsa):\r\nCreated directory '/c/Users/Khalid Sookia/.ssh'.\r\nEnter passphrase (empty for no passphrase):\r\nEnter same passphrase again:\r\nYour identification has been saved in /c/Users/Khalid Sookia/.ssh/id_rsa.\r\nYour public key has been saved in /c/Users/Khalid Sookia/.ssh/id_rsa.pub.\r\nThe key fingerprint is:\r\nSHA256:0hjjsTz8E2PT5z12.....Kr6gQ khalidsookia@gmail.com\r\nThe key's randomart image is:\r\n+---[RSA 4096]----+\r\n\r\n|     . = + oB.=..|\r\n|      . o  =.B=o.|\r\n|     .  ....*o.o+|\r\n|     .o..+oo==o==|\r\n+----[SHA256]-----+\r\n\r\nKhalid Sookia@iknsa MINGW32 ~/Downloads\r\n$ cd\r\n\r\nKhalid Sookia@iknsa MINGW32 ~\r\n$ eval \"$(ssh-agent -s)\"\r\nAgent pid 1472\r\n\r\nKhalid Sookia@iknsa MINGW32 ~\r\n$ ssh-add ~/.ssh/id_rsa\r\nIdentity added: /c/Users/Khalid Sookia/.ssh/id_rsa (/c/Users/Khalid Sookia/.ssh/id_rsa)\r\n\r\nKhalid Sookia@iknsa MINGW32 ~\r\n$ vi ~/.ssh/id_rsa.pub\r\n\r\nKhalid Sookia@iknsa MINGW32 ~\r\n$ ssh -T git@github.com\r\nThe authenticity of host 'github.com (192.30.252.128)' can't be established.\r\nRSA key fingerprint is SHA256:nThbg6kX.......RomTxdCARLviKw6E5SY8.\r\nAre you sure you want to continue connecting (yes/no)? yes\r\nWarning: Permanently added 'github.com,192.30.252.128' (RSA) to the list of known hosts.\r\nHi khalid-s! You've successfully authenticated, but GitHub does not provide shell access.\r\n```\r\n\r\nI then tried to clone a repository for which I have full access:\r\n```\r\nKhalid Sookia@iknsa MINGW32 ~/Desktop\r\n$ git clone git@github.com:iknsa-formation/angular.git\r\nCloning into 'angular'...\r\nPermission denied (publickey).\r\nfatal: Could not read from remote repository.\r\n\r\nPlease make sure you have the correct access rights\r\nand the repository exists.\r\n\r\nKhalid Sookia@iknsa MINGW32 ~/Desktop\r\n$ git clone https://github.com/iknsa-formation/angular.git\r\nCloning into 'angular'...\r\nremote: Counting objects: 316, done.\r\n Rec0), pack-reused 316\r\nReceiving objects: 100% (316/316), 364.47 KiB | 508.00 KiB/s, done.\r\nResolving deltas: 100% (187/187), done.\r\nChecking connectivity... done.\r\n\r\nKhalid Sookia@iknsa MINGW32 ~/Desktop\r\n$ git clone git@github.com:iknsa-formation/angular.git ng\r\nCloning into 'ng'...\r\nWarning: Permanently added the RSA host key for IP address '192.30.252.130' to the list of known hosts.\r\nPermission denied (publickey).\r\nfatal: Could not read from remote repository.\r\n\r\nPlease make sure you have the correct access rights\r\nand the repository exists.\r\n```\r\n\r\nAccess is denied although I am properly authenticated when I run `ssh -T git@github.com`\r\n\r\n"},"comment":{"url":"https://api.github.com/repos/git-for-windows/git/issues/comments/251424244","html_url":"https://github.com/git-for-windows/git/issues/780#issuecomment-251424244","issue_url":"https://api.github.com/repos/git-for-windows/git/issues/780","id":251424244,"user":{"login":"dscho","id":127790,"avatar_url":"https://avatars.githubusercontent.com/u/127790?v=3","gravatar_id":"","url":"https://api.github.com/users/dscho","html_url":"https://github.com/dscho","followers_url":"https://api.github.com/users/dscho/followers","following_url":"https://api.github.com/users/dscho/following{/other_user}","gists_url":"https://api.github.com/users/dscho/gists{/gist_id}","starred_url":"https://api.github.com/users/dscho/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/dscho/subscriptions","organizations_url":"https://api.github.com/users/dscho/orgs","repos_url":"https://api.github.com/users/dscho/repos","events_url":"https://api.github.com/users/dscho/events{/privacy}","received_events_url":"https://api.github.com/users/dscho/received_events","type":"User","site_admin":false},"created_at":"2016-10-04T15:33:37Z","updated_at":"2016-10-04T15:33:37Z","body":"> Yes I am using openssh-win32.\r\n\r\nFrom where did you get it (there are tons of OpenSSHs for Win32, it seems, and you gave nobody a chance to figure out which one you have)? Have you configured it correctly?"}}
{"actor":{"display_login":"dscho"}}