Open
Description
referring to http://www.nodegit.org/guides/cloning/gh-two-factor/
The docs tell me that I should use the following options object for cloning with oauth.
cloneOptions.remoteCallbacks = {
certificateCheck: function() { return 1; },
credentials: function() {
return NodeGit.Cred.userpassPlaintextNew(_TOKEN, "x-oauth-basic");
}
};
However that doesn't work and isn't what is in the tests.
I ended up using something like
var cloneOptions = {
fetchOpts: {
callbacks: {
certificateCheck: function() { return 1; },
credentials: function() {
console.log(token);
return nodegit.Cred.userpassPlaintextNew(token, 'x-oauth-basic');
}
}
}
};