Update push example by thornbill · Pull Request #481 · nodegit/nodegit
var repository; var remote;
var signature = nodegit.Signature.create("Foo bar", "foo@bar.com", 123456789, 60);
remote.setCallbacks({ credentials: function(url, userName) { return nodegit.Cred.sshKeyFromAgent(userName); } });
return remote.connect(nodegit.Enums.DIRECTION.PUSH); }) .then(function() { // Create the push object for this remote return remote.push( ["refs/heads/master:refs/heads/master"],