You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
I promise that before i posted this i looked everywhere, and tried to understand the documentation the best i could, but because there is no description on the methods in the documentation it's been pretty hard to decipher what needs to be done.
I'm trying to do a simple push, but nothing i do it seems be working.
The example it's commited on this repo, it create a repo. In my case it already exists. So instead of "create" im trying to use 'load'. Again, because o f the lack of the description i'm not even sure if that's the right way to do it. I'm basing myself from the tests. I saw a few functions using load.
var repo;
nodegit.Repository.open(repoFolder)
.then(function(repoResult) {
repo = repoResult;
return repoResult.openIndex();
})
... COMMIT FUNCTION HERE IS ALREADY WORKING ..
.then(function() {
return nodegit.Remote.load(repo, "origin").then(function(remote) {
remote.connect(nodegit.Enums.DIRECTION.PUSH);
remote.setCallbacks({
credentials: function(url, userName) {
return nodegit.Cred.sshKeyFromAgent(userName);
}
});
console.log('Connected?', remote.connected())
console.log(remote.push) // this returns undefined
});
})
This returns "Connected? 0".
I know i need to do a push in the remote, but for some reason the "push" method is undefined.
Please.... i'm pretty frustrated. Being trying to get this working for about 5 hours now, trying to do a simple push from my origin.
After adding some essential code at the beginning of the example I get:
remote Loaded
[TypeError: undefined is not a function]
I always got it at this line (11) :
}).then(function(remoteResult) {
I have tried a lot of examples...
nodegit 0.5.0
nodejs 0.12.7
Ubuntu 14.04 or OSX
More debug info, from another test:
TypeError: undefined is not a function
at /home/test/Dokument/node-auth0-sample_nodegit_local2/serverexeample.js:52:6
at tryCallOne (/home/test/Dokument/node-auth0-sample_nodegit_local2/node_modules/nodegit-promise/lib/core.js:37:12)
at /home/test/Dokument/node-auth0-sample_nodegit_local2/node_modules/nodegit-promise/lib/core.js:103:15
at flush (/home/test/Dokument/node-auth0-sample_nodegit_local2/node_modules/nodegit-promise/node_modules/asap/raw.js:50:29)
at process._tickCallback (node.js:355:11)
Activity
rafaelfaria commentedon Mar 6, 2015
Thanks to @maxkorp I actually managed to get this working if anyone else is interested in the asnwer.
maxkorp commentedon Mar 6, 2015
👍
chainsys commentedon Sep 16, 2015
push pdf,.docx,img file format not working thorwing this ERROR: [Error: Request failed with status code: 500]
Molnfront commentedon Nov 3, 2015
After adding some essential code at the beginning of the example I get:
remote Loaded
[TypeError: undefined is not a function]
I always got it at this line (11) :
}).then(function(remoteResult) {
I have tried a lot of examples...
nodegit 0.5.0
nodejs 0.12.7
Ubuntu 14.04 or OSX
More debug info, from another test:
TypeError: undefined is not a function
at /home/test/Dokument/node-auth0-sample_nodegit_local2/serverexeample.js:52:6
at tryCallOne (/home/test/Dokument/node-auth0-sample_nodegit_local2/node_modules/nodegit-promise/lib/core.js:37:12)
at /home/test/Dokument/node-auth0-sample_nodegit_local2/node_modules/nodegit-promise/lib/core.js:103:15
at flush (/home/test/Dokument/node-auth0-sample_nodegit_local2/node_modules/nodegit-promise/node_modules/asap/raw.js:50:29)
at process._tickCallback (node.js:355:11)