Questions tagged [nodegit]

nodegit is a collection of non-blocking Node.js libgit2 bindings, raw api, convenience api, unit tests, documentation and accomodations to make contributing easier.

NodeGit is a collection of non-blocking Node.js libgit2 bindings, raw api, convenience api, unit tests, documentation and accomodations to make contributing easier.

Official Website

API Documentation

110 questions
0
votes
0 answers

Error while cloning repo with nodegit

I'm trying to clone a repo with nodegit, but I end up with cloning nothing but .git directory. None of the my other files are being downloaded. And I got this error in the console: Assertion failed: (t->cred), function on_headers_complete, file…
SafaOrhan
  • 690
  • 9
  • 19
0
votes
1 answer

nodegit: getHeadCommit() holds the directory (libgit2)

After I clone the repository using nodegit and call getHeadCommit(), the Node process holds the directory, which prevents it from being removed by code (fs-extra remove), nor by OS. console.log((async (): Promise => { const tempDirectory:…
wrager
  • 813
  • 1
  • 7
  • 25
0
votes
1 answer

Correct way to use promise in promised loop

Hello, I use Promise for a initialize node project. I want to insert in my MongoDb the name of files on all of my branch on my git repository. I use nodegit to manipulate repo, for every nodegit method the return is a Promise. But i need to loop on…
0
votes
1 answer

Unable to import native nodejs module in electron project

I'm working on an open source electron project which I am building using webpack. One requirement for my project is to use the nodegit library which has to be built as a native module. I've followed what appears to be conventional advice when…
Alexander Trauzzi
  • 7,277
  • 13
  • 68
  • 112
0
votes
1 answer

Amend commits metadata using nodegit

I'm trying to change emails in commits using nodegit. here is my code: var Git = require('nodegit') Git.Repository.open('repo') .then(repository => { return repository.getBranchCommit('dev') }) .then(commit => { var eventEmitter =…
stkvtflw
  • 12,092
  • 26
  • 78
  • 155
0
votes
0 answers

How can I pull code only if origin is ahead

I'm trying to make an updater for my Electron app, I only want to update the html code that will be fetched from git. But I only want to fetch code if the origin has new commits, that way I can reload the browser if the app was updated. How can I do…
0
votes
1 answer

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 unexpected content-type errno: -1 }. Following is…
Ramesh Gurusamy
  • 138
  • 1
  • 6
0
votes
1 answer

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 able to open the connection ,commit the file but…
Kunal Vashist
  • 2,380
  • 6
  • 30
  • 59
0
votes
1 answer

Code fails to output errors or exceptions in Node.JS

I am using a Node.JS library called GitNode. I don't think it's important but basically it's an API for git commands in Node.JS. I have a piece of code whose purpose is to create a new branch in an existing repository. After running the code, I know…
Cameron
  • 2,805
  • 3
  • 31
  • 45
0
votes
3 answers

How to update the local path with a commit version?

I'm trying to clone a repo to the local file system and then checkout a specific commit. This is what I have: Git.Clone(GIT_REPO_URL, localPath, CLONE_OPTIONS).then((repo) => { return repo.getCommit(version).then((commit) => { // use the…
Nitzan Tomer
  • 155,636
  • 47
  • 315
  • 299
0
votes
1 answer

How to remove a remote branch with nodegit?

I tried to push the refspec without src defined and it doesn't remove the remote branch. Here's what my code look like var refs = [ ':refs/remotes/origin/branch-a' ]; Git.Repository.open(workingPath) .then((repository) => { return…
m0xx
  • 1
  • 2
0
votes
2 answers

How to cancel a nodegit clone operation?

Using nodegit, how do I cancel a long running clone operation? Our repo is like 3GB, the user may want to abort it because it's taking too much time. Can I just reject the promise? Like so? var cloneRepository = NodeGit.Clone(cloneURL, localPath,…
dstj
  • 4,800
  • 2
  • 39
  • 61
0
votes
1 answer

Async operations with nodegit on electron not working

I am working on a project using electron and nodegit, and I recently updated my dependencies. After solving the compatibility issues, I found two versions of nodegit and electron that work. But upon testing it, I found that async nodegit operations…
user5483398
0
votes
1 answer

Configure gcc-4.8.5 to include GLIBCXX_3.4.20 on centos6

Hi folks i've been searching for solutions to this problem for days but none of the methods posted online worked for me. Basically I'm trying to install NodeGit library on my production server (centos-release-6-8.el6.centos.12.3.x86_64). Doing npm…
Calvin Hu
  • 3,595
  • 4
  • 18
  • 23
0
votes
0 answers

rawmemchr: symbol not found in nodegit with docker

When I run the server in the Docker container, everything works fine until I include the line nodegit = require 'nodegit'. If NodeGit is required, on docker-compose up I get the following error: Error: Error…
Anastasia
  • 184
  • 11