14 questions
1
vote
1
answer
933
views
How to use GitHub SSH key for private/public repositories in a Nodejs for (clone, pull, push, and commit)
I tried using Nodegit in the same method, but I got an error message saying "Clone.clone, stack: Error: Method clone has caused an error." or "Github authentitation failed."
I have ...
0
votes
1
answer
408
views
NodeGit checkout a branch but Get error "HEAD detached at origin/branch"?
I am using nodegit to checkout from clone and Open it to do something.
My code like this:
//repo is a Repository from Clone() or Open()
//branchName is your branch name, of course
repo.getBranch('refs/...
0
votes
1
answer
528
views
How can I list all files with NodeGit? (Equivalent of 'git ls-files')
I currently run the following git command for list of all untracked and modified files:
git ls-files -mo --exclude-standard
Is there any equivalent for it in the NodeGit world?
4
votes
0
answers
452
views
List different commits between two branches by using nodegit
In my program, I'm using nodegit. I'm able to list commits using nodegit:
var nodegit = require("nodegit");
var path = require("path");
var fs = require("fs");
var shas = [];
var names= [];
var ...
2
votes
1
answer
1k
views
NodeGit how to get last commit id of another branch?
I have two branches checked out of my system Master and Dev.
My Working directory is Master from Master I want to push/merge file to dev after knowing the difference.
For say in Master I am working ...
0
votes
1
answer
41
views
node-github: "getStatsContributors" doesn't return results properly
This is how I'm using the method:
github.repos.getStatsContributors({
repo: 'Cloudformation-Webserver',
owner : 'DorrinPk'
}, function (err, res) {
console.log(err, ...
0
votes
1
answer
188
views
Unable to clone hosted Repository using NodeGit
I have created a GIT Bare Repository in the Linux server.
And while I try to clone the repository using Nodegit from the local workstation, I'm getting the following error.,
err { Error: received ...
0
votes
1
answer
2k
views
How to push using nodegit?
I am trying to push the file In the repository but getting error that {remote origin already exits errno -4}
Basic Task Open the connection, commit the file, {pull and merge} , push the changes
I am ...
4
votes
1
answer
2k
views
How add directory or all files in a directory by nodegit?
I am new on node js and on git as well, i am building an app that will write results on text files and will push on git rapidly.
After many struggle I have figured out following code that is writing ...
7
votes
3
answers
10k
views
Decoding base64 while using GitHub API to Download a File
I am using the GitHub API to download a file from GitHub. I have been able to successfully authenticate as well as get a response from github, and see a base64 encoded string representing the file ...
0
votes
1
answer
2k
views
git push remote ssh using Nodegit, Not working?
Hi I am trying to do a git push origin master command with the help of Nodegit, but it is resulting in an error,
var Git = require('nodegit');
function gitRemoteLookUp(repoPath) {
var open = Git....
1
vote
1
answer
94
views
handling return values in promises nodejs
I have built this function in NodeJs,
var Git = require('nodegit');
var fse = require('fs-extra');
var path = require('path');
var fs = require('fs');
var repoPath = 'D:\\sample'
function ...
1
vote
0
answers
157
views
node-github - get user public info
I'm trying to fetch some users data for a small research on github by using this api:
https://developer.github.com/v3/users/#get-a-single-user
When I'm trying to fetch user data via crul I'm getting ...
0
votes
1
answer
557
views
Correct approach to getting all pages from API that utilizes a Link header (using JavaScript/NodeJS)
I'm using a NodeJS module called node-github, which is a wrapper around the Github API, to get some statistics about certain users, such as their followers:
var getFollowers = function(user, callback)...