I'm trying to use the Nodegit plugin to clone some git repos into a directory called 'tmp' so I can do things with the actual folder (upload it to a server). Here's my code:
var git = require('nodegit'); var repos = [some https repo urls] var options = { remoteCallbacks: { certificateCheck: function() { return 1; } } }; for(i = 0; i<repos.length; i++){ git.Clone(repos[i], './tmp', options).catch(function(err) { console.error(err); } ); } All it does is create an empty directory called 'tmp' for a split second and deletes it. The errors I get are ./tmp' exists and is not an empty directory (but it does not exist?) and authentication required but no callback set. Anyone know how to fix these?
git.Clone(repos[i], './tmp).catch(function(err) { console.log(err); } );to see what's going wrong.