
Security News
Axios Supply Chain Attack Reaches OpenAI macOS Signing Pipeline, Forces Certificate Rotation
OpenAI rotated macOS signing certificates after a malicious Axios package reached its CI pipeline in a broader software supply chain attack.
@chmac/node-git-server
Advanced tools
🎡 A (fork of the original) configurable git server written in Node.js
This package is a FORK. At some point the features here might get merged upstream and then this fork might disappear. It's published only for the author's personal convenience.
🎡 A configurable git server written in Node.js
there be 🐲 here! The API's and functionality are still be cemented, anything before a 1.0.0 release will be subject to change.
npm install node-git-server
const path = require('path');
const Server = require('node-git-server');
const repos = new Server(path.resolve(__dirname, 'tmp'), {
autoCreate: true
});
const port = process.env.PORT || 7005;
repos.on('push', (push) => {
console.log(`push ${push.repo}/${push.commit} (${push.branch})`);
push.accept();
});
repos.on('fetch', (fetch) => {
console.log(`fetch ${fetch.commit}`);
fetch.accept();
});
repos.listen(port, () => {
console.log(`node-git-server running at http://localhost:${port}`)
});
then start up the node-git-server server...
$ node example/index.js
meanwhile...
$ git push http://localhost:7005/beep master
Counting objects: 356, done.
Delta compression using up to 2 threads.
Compressing objects: 100% (133/133), done.
Writing objects: 100% (356/356), 46.20 KiB, done.
Total 356 (delta 210), reused 355 (delta 210)
To http://localhost:7005/beep
* [new branch] master -> master
const path = require('path');
const Server = require('node-git-server');
const repos = new Server(path.resolve(__dirname, 'tmp'), {
autoCreate: true
});
const port = process.env.PORT || 7005;
repos.on('push', (push) => {
console.log(`push ${push.repo}/${push.commit} (${push.branch})`);
repos.list((err, results) => {
push.log(' ');
push.log('Hey!');
push.log('Checkout these other repos:');
for(const repo of results) {
push.log(`- ${repo}`);
}
push.log(' ');
});
push.accept();
});
repos.listen(port, () => {
console.log(`node-git-server running at http://localhost:${port}`)
});
then start up the node-git-server server...
$ node example/index.js
meanwhile...
$ git push http://localhost:7005/beep master
Counting objects: 356, done.
Delta compression using up to 2 threads.
Compressing objects: 100% (133/133), done.
Writing objects: 100% (356/356), 46.20 KiB, done.
Total 356 (delta 210), reused 355 (delta 210)
remote:
remote: Hey!
remote: Checkout these other repos:
remote: - test.git
remote:
To http://localhost:7005/test
77bb26e..22918d5 master -> master
const path = require('path');
const Server = require('node-git-server');
const repos = new Server(path.resolve(__dirname, 'tmp'), {
autoCreate: true,
authenticate: ({type, repo, user}, next) => {
if(type == 'push') {
user((username, password) => {
console.log(username, password);
next();
});
} else {
next();
}
}
});
const port = process.env.PORT || 7005;
repos.on('push', (push) => {
console.log(`push ${push.repo}/${push.commit} (${push.branch})`);
push.accept();
});
repos.on('fetch', (fetch) => {
console.log(`fetch ${fetch.commit}`);
fetch.accept();
});
repos.listen(port, () => {
console.log(`node-git-server running at http://localhost:${port}`)
});
then start up the node-git-server server...
$ node example/index.js
meanwhile...
$ git push http://localhost:7005/beep master
Counting objects: 356, done.
Delta compression using up to 2 threads.
Compressing objects: 100% (133/133), done.
Writing objects: 100% (356/356), 46.20 KiB, done.
Total 356 (delta 210), reused 355 (delta 210)
To http://localhost:7005/beep
* [new branch] master -> master
Running the following command will start up a simple http server:
node example/index.js
If you want to try using https run the following
node example/index.js --https
When running https with self-signed certs there are two ways to override the git-clients behavior using
git config http.sslVerify falseorgit config --global http.sslCAInfo /path/to/cert.pem
For more information please visit the docs
This library is aimed to have a zero dependency footprint. If you are reading this and you see dependencies, help to remove them 🐒.
This is a hard fork from pushover.
FAQs
🎡 A (fork of the original) configurable git server written in Node.js
We found that @chmac/node-git-server demonstrated a not healthy version release cadence and project activity because the last version was released a year ago. It has 1 open source maintainer collaborating on the project.
Did you know?

Socket for GitHub automatically highlights issues in each pull request and monitors the health of all your open source dependencies. Discover the contents of your packages and block harmful activity before you install or update your dependencies.

Security News
OpenAI rotated macOS signing certificates after a malicious Axios package reached its CI pipeline in a broader software supply chain attack.

Security News
Open source is under attack because of how much value it creates. It has been the foundation of every major software innovation for the last three decades. This is not the time to walk away from it.

Security News
Socket CEO Feross Aboukhadijeh breaks down how North Korea hijacked Axios and what it means for the future of software supply chain security.