{"action":"created","issue":{"url":"https://api.github.com/repos/nodegit/nodegit/issues/511","labels_url":"https://api.github.com/repos/nodegit/nodegit/issues/511/labels{/name}","comments_url":"https://api.github.com/repos/nodegit/nodegit/issues/511/comments","events_url":"https://api.github.com/repos/nodegit/nodegit/issues/511/events","html_url":"https://github.com/nodegit/nodegit/issues/511","id":64040009,"number":511,"title":"Cred.sshKeyNew not working: Too many redirects or authentication replays","user":{"login":"dcodeIO","id":1136893,"avatar_url":"https://avatars.githubusercontent.com/u/1136893?v=3","gravatar_id":"","url":"https://api.github.com/users/dcodeIO","html_url":"https://github.com/dcodeIO","followers_url":"https://api.github.com/users/dcodeIO/followers","following_url":"https://api.github.com/users/dcodeIO/following{/other_user}","gists_url":"https://api.github.com/users/dcodeIO/gists{/gist_id}","starred_url":"https://api.github.com/users/dcodeIO/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/dcodeIO/subscriptions","organizations_url":"https://api.github.com/users/dcodeIO/orgs","repos_url":"https://api.github.com/users/dcodeIO/repos","events_url":"https://api.github.com/users/dcodeIO/events{/privacy}","received_events_url":"https://api.github.com/users/dcodeIO/received_events","type":"User","site_admin":false},"labels":[],"state":"open","locked":false,"assignee":null,"milestone":null,"comments":6,"created_at":"2015-03-24T16:18:53Z","updated_at":"2015-04-14T12:15:44Z","closed_at":null,"body":"Hello everyone,\r\n\r\nI am trying to automate pushing to a GitHub repository using `NodeGit.Cred.sshKeyNew`, but it looks like I am not able to get this working somehow. `NodeGit.Cred.userpassPlaintextNew` works just fine.\r\n\r\nThis is what I have:\r\n\r\n```js\r\n}).then(function(remoteResult) {\r\n\tremote = remoteResult;\r\n\tremote.setCallbacks({\r\n\t\tcredentials: function(url, userName) {\r\n\t\t\treturn nodegit.Cred.sshKeyNew(\r\n\t\t\t\tuserName,\r\n\t\t\t\tpath.join(__dirname, \"..\", \"..\", \"data\", \"mykey-rsa.pub\"),\r\n\t\t\t\tpath.join(__dirname, \"..\", \"..\", \"data\", \"mykey-rsa\"),\r\n\t\t\t\t\"myPass\"\r\n\t\t\t);\r\n\t\t}\r\n\t});\r\n\treturn remote.connect(nodegit.Enums.DIRECTION.PUSH);\r\n})\r\n```\r\n\r\nWhich always results in: `Error: Too many redirects or authentication replays`.\r\n\r\nI did double check that:\r\n* paths to the public and private key files are correct\r\n* the key is properly installed on GitHub\r\n* the key has been generated with `ssh-keygen -t rsa`\r\n* the key's password is correct\r\n\r\nAm I doing something wrong there?"},"comment":{"url":"https://api.github.com/repos/nodegit/nodegit/issues/comments/92787762","html_url":"https://github.com/nodegit/nodegit/issues/511#issuecomment-92787762","issue_url":"https://api.github.com/repos/nodegit/nodegit/issues/511","id":92787762,"user":{"login":"dcodeIO","id":1136893,"avatar_url":"https://avatars.githubusercontent.com/u/1136893?v=3","gravatar_id":"","url":"https://api.github.com/users/dcodeIO","html_url":"https://github.com/dcodeIO","followers_url":"https://api.github.com/users/dcodeIO/followers","following_url":"https://api.github.com/users/dcodeIO/following{/other_user}","gists_url":"https://api.github.com/users/dcodeIO/gists{/gist_id}","starred_url":"https://api.github.com/users/dcodeIO/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/dcodeIO/subscriptions","organizations_url":"https://api.github.com/users/dcodeIO/orgs","repos_url":"https://api.github.com/users/dcodeIO/repos","events_url":"https://api.github.com/users/dcodeIO/events{/privacy}","received_events_url":"https://api.github.com/users/dcodeIO/received_events","type":"User","site_admin":false},"created_at":"2015-04-14T12:15:43Z","updated_at":"2015-04-14T12:15:43Z","body":"Stupid me. Thanks!"}}