{"action":"closed","issue":{"url":"https://api.github.com/repos/nodegit/nodegit/issues/985","repository_url":"https://api.github.com/repos/nodegit/nodegit","labels_url":"https://api.github.com/repos/nodegit/nodegit/issues/985/labels{/name}","comments_url":"https://api.github.com/repos/nodegit/nodegit/issues/985/comments","events_url":"https://api.github.com/repos/nodegit/nodegit/issues/985/events","html_url":"https://github.com/nodegit/nodegit/issues/985","id":146708164,"number":985,"title":"Fetch() hangs when it is used against ssh protocol with sshKeyFromAgent()","user":{"login":"normanzb","id":130634,"avatar_url":"https://avatars.githubusercontent.com/u/130634?v=3","gravatar_id":"","url":"https://api.github.com/users/normanzb","html_url":"https://github.com/normanzb","followers_url":"https://api.github.com/users/normanzb/followers","following_url":"https://api.github.com/users/normanzb/following{/other_user}","gists_url":"https://api.github.com/users/normanzb/gists{/gist_id}","starred_url":"https://api.github.com/users/normanzb/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/normanzb/subscriptions","organizations_url":"https://api.github.com/users/normanzb/orgs","repos_url":"https://api.github.com/users/normanzb/repos","events_url":"https://api.github.com/users/normanzb/events{/privacy}","received_events_url":"https://api.github.com/users/normanzb/received_events","type":"User","site_admin":false},"labels":[],"state":"closed","locked":false,"assignee":null,"milestone":null,"comments":2,"created_at":"2016-04-07T18:33:41Z","updated_at":"2016-04-14T15:01:40Z","closed_at":"2016-04-14T15:01:40Z","body":"It works if the repo's `origin` remote is setup to use https but it hangs if the remote is setup to use github ssh such as `git@github.com:nodegit/nodegit.git`\r\n\r\nIt calls `credentials` callback endlessly without proceeding ahead.\r\n\r\n\r\n```\r\n'use strict';\r\n\r\nvar console = require('console');\r\nvar git = require('nodegit');\r\nvar repo;\r\n\r\ngit.Repository.open('.')\r\n.then(function(repository){\r\n    repo = repository;\r\n    return repo.getStatus();\r\n})\r\n.then(function(status){\r\n    console.log(status);\r\n    return repo.fetch('origin', {\r\n        callbacks: {\r\n            credentials: function(url, userName) {\r\n                return git.Cred.sshKeyFromAgent(userName);\r\n            }\r\n        }\r\n    });\r\n})\r\n.then(function(fetched){\r\n    console.log('worked');\r\n}, function(err){\r\n    console.log(err);\r\n});\r\n```"}}