Advertisement
Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- .then(function(){
- return repo.getRemote("origin")
- })
- .then(function(remoteResult){
- remote = remoteResult;
- remote.setCallbacks({
- credentials: function(url, userName) {
- return nodegit.Cred.sshKeyFromAgent(userName);
- }});
- // console.log("After call back");
- console.log('remote Configured');
- return remote.connect(nodegit.Enums.DIRECTION.PUSH);
- })
- .then(function(){
- console.log('remote Connected?', remote.connected());
- return remote.push(
- ["refs/heads/master:refs/heads/master"],
- null,
- repo.defaultSignature(),
- "Push to master")
- })
- .catch(function(err){
- console.log("Error from catch block")
- console.log(err);
- }).then(function(){
- cosnole.log("Pushed")
- })
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement