Title: Cloning locks up when more than 3 at the same time. · Issue #364 · nodegit/nodegit · GitHub
Open Graph Title: Cloning locks up when more than 3 at the same time. · Issue #364 · nodegit/nodegit
X Title: Cloning locks up when more than 3 at the same time. · Issue #364 · nodegit/nodegit
Description: Hello, it seems that there is a problem with ssh agent support. this example works fine: var remote = "https://github.com/nodegit/nodegit.git" var git = require("nodegit"); var fs = require("fs"); var path = require("path"); function rmd...
Open Graph Description: Hello, it seems that there is a problem with ssh agent support. this example works fine: var remote = "https://github.com/nodegit/nodegit.git" var git = require("nodegit"); var fs = require("fs"); ...
X Description: Hello, it seems that there is a problem with ssh agent support. this example works fine: var remote = "https://github.com/nodegit/nodegit.git" var git = require("nodegit"); var ...
Opengraph URL: https://github.com/nodegit/nodegit/issues/364
X: @github
Domain: github.com
{"@context":"https://schema.org","@type":"DiscussionForumPosting","headline":"Cloning locks up when more than 3 at the same time. ","articleBody":"Hello,\n\nit seems that there is a problem with ssh agent support. this example works fine:\n\n```\nvar remote = \"https://github.com/nodegit/nodegit.git\"\nvar git = require(\"nodegit\");\n\nvar fs = require(\"fs\");\nvar path = require(\"path\");\nfunction rmdirSync(path) {\n var files = [];\n if( fs.existsSync(path) ) {\n files = fs.readdirSync(path);\n files.forEach(function(file,index){\n var curPath = path + \"/\" + file;\n if(fs.lstatSync(curPath).isDirectory()) { // recurse\n rmdirSync(curPath);\n } else { // delete file\n fs.unlinkSync(curPath);\n }\n });\n fs.rmdirSync(path);\n }\n}\n\nfunction clone(to) {\n rmdirSync(to);\n return git.Clone.clone(remote, to).then(function () {\n console.log(\"ok!\", to);\n }, function (err) {\n console.log(\"failed!\", to, err);\n });\n}\n\nconsole.log(\"start\");\n\nclone(\"/tmp/nodegit-testA\").then(function() {\n clone(\"/tmp/nodegit-testB\").then(function() {\n clone(\"/tmp/nodegit-testC\").then(function() {\n clone(\"/tmp/nodegit-testD\").then(function() {\n clone(\"/tmp/nodegit-testE\").then(function() {\n for (var i = 0; i \u003c 10; i++) {\n var to = \"/tmp/nodegit-test\" + i;\n console.log(\"start\", i);\n clone(to);\n }\n });\n });\n });\n });\n});\n\nconsole.log(\"end\");\n```\n\noutput:\n\n```\nstart\nend\nok! /tmp/nodegit-testA\nok! /tmp/nodegit-testB\nok! /tmp/nodegit-testC\nok! /tmp/nodegit-testD\nok! /tmp/nodegit-testE\nstart 0\nstart 1\nstart 2\nstart 3\nstart 4\nstart 5\nstart 6\nstart 7\nstart 8\nstart 9\nok! /tmp/nodegit-test2\nok! /tmp/nodegit-test3\nok! /tmp/nodegit-test1\nok! /tmp/nodegit-test0\nok! /tmp/nodegit-test4\nok! /tmp/nodegit-test5\nok! /tmp/nodegit-test6\nok! /tmp/nodegit-test7\nok! /tmp/nodegit-test8\nok! /tmp/nodegit-test9\n```\n\nThis is fine and expected, but when I switch to using ssh agent key :\n\n```\nreturn git.Clone.clone(remote, to, {\n remoteCallbacks: {\n credentials: function (url, userName) {\n return git.Cred.sshKeyFromAgent(\"\");\n }\n }\n}).then(function () {\n```\n\n(and a git ssh server) then nodegit can checkout one by one as before:\n\n```\nok! /tmp/nodegit-testA\nok! /tmp/nodegit-testB\nok! /tmp/nodegit-testC\nok! /tmp/nodegit-testD\nok! /tmp/nodegit-testE\n```\n\nbut will hang when called multiple times at once and never return. (No ok or failed messages for /tmp/nodegit-test0 - /tmp/nodegit-test9)\n\nDirecotrys /tmp/nodegit-test0 to /tmp/nodegit-test3 are created:\n\n```\nfind /tmp/nodegit-test0/\n/tmp/nodegit-test0/\n/tmp/nodegit-test0/.git\n/tmp/nodegit-test0/.git/config\n/tmp/nodegit-test0/.git/HEAD\n/tmp/nodegit-test0/.git/description\n/tmp/nodegit-test0/.git/info\n/tmp/nodegit-test0/.git/info/exclude\n/tmp/nodegit-test0/.git/hooks\n/tmp/nodegit-test0/.git/hooks/README.sample\n/tmp/nodegit-test0/.git/refs\n/tmp/nodegit-test0/.git/refs/tags\n/tmp/nodegit-test0/.git/refs/heads\n/tmp/nodegit-test0/.git/objects\n/tmp/nodegit-test0/.git/objects/pack\n/tmp/nodegit-test0/.git/objects/info\n```\n\nbut there is no working copy.\n\nCan anyone give me he hint what I'm doing wrong? it is not allowed to call multiple checkout commands at the same time?\n","author":{"url":"https://github.com/drieks","@type":"Person","name":"drieks"},"datePublished":"2015-01-22T10:11:33.000Z","interactionStatistic":{"@type":"InteractionCounter","interactionType":"https://schema.org/CommentAction","userInteractionCount":6},"url":"https://github.com/364/nodegit/issues/364"}
| route-pattern | /_view_fragments/issues/show/:user_id/:repository/:id/issue_layout(.:format) |
| route-controller | voltron_issues_fragments |
| route-action | issue_layout |
| fetch-nonce | v2:08518638-3271-41ba-5ca4-0a58cef02ef4 |
| current-catalog-service-hash | 81bb79d38c15960b92d99bca9288a9108c7a47b18f2423d0f6438c5b7bcd2114 |
| request-id | A8FE:A6347:48FE7A0:649D2F8:6A5E21D8 |
| html-safe-nonce | 2b4ccc4f5955ff905cf6fa4370b926d0222a69eca95f993623c0bfad77c06bb1 |
| visitor-payload | eyJyZWZlcnJlciI6IiIsInJlcXVlc3RfaWQiOiJBOEZFOkE2MzQ3OjQ4RkU3QTA6NjQ5RDJGODo2QTVFMjFEOCIsInZpc2l0b3JfaWQiOiI4NzQxODQxNzExNTI4ODEzMDE2IiwicmVnaW9uX2VkZ2UiOiJpYWQiLCJyZWdpb25fcmVuZGVyIjoiaWFkIn0= |
| visitor-hmac | 51a43a266fac144b6e5a4233253eb9656da8bc9b79825ed416f7b7fe8835c23c |
| hovercard-subject-tag | issue:55135406 |
| github-keyboard-shortcuts | repository,issues,copilot |
| google-site-verification | Apib7-x98H0j5cPqHWwSMm6dNU4GmODRoqxLiDzdx9I |
| octolytics-url | https://collector.github.com/github/collect |
| analytics-location | / |
| fb:app_id | 1401488693436528 |
| apple-itunes-app | app-id=1477376905, app-argument=https://github.com/_view_fragments/issues/show/nodegit/nodegit/364/issue_layout |
| twitter:image | https://opengraph.githubassets.com/ae7d4f9cba08aaac9746f9e87bdadf3c5a9d636beda78e867ff8b3c0bfee79b1/nodegit/nodegit/issues/364 |
| twitter:card | summary_large_image |
| og:image | https://opengraph.githubassets.com/ae7d4f9cba08aaac9746f9e87bdadf3c5a9d636beda78e867ff8b3c0bfee79b1/nodegit/nodegit/issues/364 |
| og:image:alt | Hello, it seems that there is a problem with ssh agent support. this example works fine: var remote = "https://github.com/nodegit/nodegit.git" var git = require("nodegit"); var fs = require("fs"); ... |
| og:image:width | 1200 |
| og:image:height | 600 |
| og:site_name | GitHub |
| og:type | object |
| og:author:username | drieks |
| hostname | github.com |
| expected-hostname | github.com |
| None | e5010f4d2748a3cbef86e1580413ff14701bd99f255268dfb4a2857c77e2cc7c |
| turbo-cache-control | no-preview |
| go-import | github.com/nodegit/nodegit git https://github.com/nodegit/nodegit.git |
| octolytics-dimension-user_id | 657068 |
| octolytics-dimension-user_login | nodegit |
| octolytics-dimension-repository_id | 1383170 |
| octolytics-dimension-repository_nwo | nodegit/nodegit |
| octolytics-dimension-repository_public | true |
| octolytics-dimension-repository_is_fork | false |
| octolytics-dimension-repository_network_root_id | 1383170 |
| octolytics-dimension-repository_network_root_nwo | nodegit/nodegit |
| turbo-body-classes | logged-out env-production page-responsive |
| disable-turbo | false |
| browser-stats-url | https://api.github.com/_private/browser/stats |
| browser-errors-url | https://api.github.com/_private/browser/errors |
| release | 7d23604c4a8ce0274b4c71bb2adbe6e1c9d5904f |
| ui-target | full |
| theme-color | #1e2327 |
| color-scheme | light dark |
Links:
Viewport: width=device-width