Advertisement
Guest User

Untitled

a guest
May 25th, 2016
53
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
text 0.81 KB | None | 0 0
  1.  
  2. .then(function(){
  3. return repo.getRemote("origin")
  4. })
  5. .then(function(remoteResult){
  6. remote = remoteResult;
  7. remote.setCallbacks({
  8. credentials: function(url, userName) {
  9. return nodegit.Cred.sshKeyFromAgent(userName);
  10.  
  11. }});
  12. // console.log("After call back");
  13. console.log('remote Configured');
  14. return remote.connect(nodegit.Enums.DIRECTION.PUSH);
  15. })
  16. .then(function(){
  17. console.log('remote Connected?', remote.connected());
  18. return remote.push(
  19. ["refs/heads/master:refs/heads/master"],
  20. null,
  21. repo.defaultSignature(),
  22. "Push to master")
  23. })
  24. .catch(function(err){
  25. console.log("Error from catch block")
  26. console.log(err);
  27. }).then(function(){
  28. cosnole.log("Pushed")
  29. })
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement