Nodegitプラグインを使用して、いくつかのgitリポジトリを「tmp」というディレクトリに複製して、実際のフォルダーを操作できるようにしようとしています(サーバーにアップロードします)。これが私のコードです:
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); } );
}
'tmp' という名前の空のディレクトリを一瞬作成して削除するだけです。私が得るエラーは./tmp' exists and is not an empty directory
(しかし存在しませんか?)とauthentication required but no callback set
. これらを修正する方法を知っている人はいますか?