Code Monkey home page Code Monkey logo

nodejs-git-server's Issues

How can I do to create a git system ?

Hi, thank you for the lib, but I have a question.

I have got the project and run the example.js by nodejs.

And then what I should do ? I don't know in where to create the repo, I tried to create a dir: NodeJS-Git-Server/tmp/repos/stackdot and use the 'git init' to create .git

Then, I'm clone http://localhost:7000/stackdot.git, The vaily of name and pass is ok. When I add->commit->push file, the server log can print in console.

But,the dir NodeJS-Git-Server/tmp/repos/stackdot has none.

So, I hope know what should I do to build a git system...

Excuse me, I'm a new comer, the technology and english is bad...

Thank you very much !

Hosting bare git repos on a separate server?

Hello, thank you so much for the amazing repo.

I understand that in your implementation, you use git-upload-pack and git-receive-pack processes to allow the client and server to talk to each other (figure out what packets the other needs, etc.)
To my knowledge, this git command accepts a local directory, but what if I host all my bare git repositories on a separate server, like an AWS S3 bucket? Could I stream a remote bare repo to these git commands, that then stream the necessary packets to the client?
I don't want to host all my bare git repos on my heroku instance, since the storage is ephemeral and limited. Any guidance would be appreciated!

About ReadMe

hay, Give some Readme for better starting.......

I got error, at events.js:72

I followed instruction on web site.

I got error when I tried to use git clone http://localhost:7000/myrepo.git

the server show log as following:

events.js:72
throw er; // Unhandled 'error' event
^
Error: spawn ENOENT
at errnoException (child_process.js:980:11)
at Process.ChildProcess._handle.onexit (child_process.js:771:34)

I run it on windows 7

npm install error

This command

npm install git-server

Throws this error

npm ERR! code E404
npm ERR! 404 Not Found - GET https://github.com/substack/socket.io-client/tarball/master
npm ERR! 404 
npm ERR! 404  'socket.io-client@https://github.com/substack/socket.io-client/tarball/master' is not in this registry.
npm ERR! 404 
npm ERR! 404 Note that you can also install from a
npm ERR! 404 tarball, folder, http url, or git url.

npm ERR! A complete log of this run can be found in:
npm ERR!     /home/foo/.npm/_logs/2023-09-14T21_17_01_619Z-debug-0.log

Adding a repo after creating server

Hello,

I'm trying to create an app where I can create repos on the fly. I"m trying the following approach:

// server.js
var repos = [ ... ]

server = new GitServer(repos);

server.createRepo({
  name:'MyNewRepo',
  anonRead:false,
  users: [
    { user:newUser, permissions:['R','W'] }
  ]
}, function(err, repo) {
    console.log(err, repo);
})

When I run node server.js I get an error message:

{ [Error: ENOENT, open '/tmp/repos/MyNewRepo.git/hooks/.git-emit.port']
  errno: -2,
  code: 'ENOENT',
  path: '/tmp/repos/MyNewRepo.git/hooks/.git-emit.port' } undefined

Am I missing something simple, or does this package not support adding repos on the fly?

issues with async 2.0

filter, reject, some, every, and related functions now expect an error as the first callback argument, rather than just a simple boolean. Pass null as the first argument, or use fs.access instead of fs.exists. (#118, #774, #1028, #1041)

causes

/root/node-distribute/node_modules/git-server/host.js:269
          if (results.length > 0) {
                     ^
TypeError: Cannot read property 'length' of null

Git push really slow

Hi, thank you very much for posting this project online. It looks immensely helpful.

When i try to make a git push origin master It takes up about 1 hour on upload 5mb...
I don't know why is so slow...

I hope you can help me.

Thank you.

hello i'd like to contribute.;-)

this is an awsome project, would it be nicer with a web gui like github?

i would work on it if community like to and , if some of you want to participate it 'll be awsome!!!

Future?

hello, i see this is a very good project, can i know the future enchantment? maybe i could help. i mean like http based API to add users and list etc.

Custom authentication handling

Is it possible to handle authentication manually using this library?

I need to be able to authenticate users with a password hash or key.

Documentation?

Thank you very much for posting this project online. It looks immensely helpful, and I want to start using it ASAP.

Is there any further documentation beyond what is written, and the commented source code? For example, the docs seem to indicate that you can only create new repos and add users to them. I think this package can do much more but just not sure how to use any of the methods. For example, how do you list existing repos? Would love to learn more.

Thank you.

Running on Windows with cygwin/msysgit

Hi,

I've been running this module on my dev machine (mac OS) without an issue. But when trying to run it on my windows production machine, I'm running in to problems.

Basically, I've tried this with msysgit (1.9.4) and cygwin (1.8.1.2). With cygwin, I've set the path env variable to the cygwin bin dir, so all necessary executables were available. With msysgit, I've set env paths to msysgit/bin and msysgit/libexec/git-core dirs. The results were always the same.

Also, I've tried versions 0.2.1 and 0.2.0 of this module, with the same results.

Git pull is not an issue, this works great. But as soon as i push, I'm getting this (using longjohn for extended stack trace):

Server:

LOG:  Got a PUSH call for myrepo.git
LOG:  demo is trying to push on repo: myrepo ...
LOG:  demo Successfully did a push on myrepo

D:\node\AppHost2\node_modules\longjohn\dist\long
        throw e;
              ^
Error: read ECONNRESET
    at errnoException (net.js:904:11)
    at onread (net.js:558:19)

    at fireErrorCallbacks (net.js:439:15)
    at Socket._destroy (net.js:475:3)
    at onread (net.js:558:10)

Client:

Pushing to http://demo:[email protected]:7000/myrepo.git
POST git-receive-pack (658 bytes)
error: RPC failed; result=56, HTTP code = 0
fatal: The remote end hung up unexpectedly
fatal: The remote end hung up unexpectedly
Everything up-to-date

I've no clue what to try now. Have you successfully run this module on a windows environment? Do you have any idea?

Can we modify the returned log when a git push is performed?

Your app is just what I dream 👍

When a git push is performed, there is a classic log:

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)
....
 * [new branch]      master -> master

Can we add some lines to this log?

Thanks!

TypeError: Cannot read property 'prototype' of undefined

Any ideas why I'm getting this error when trying to start the server (npm start) with the following snippet of code?

var GitServer = require('git-server');
var newUser = {
	username:'demo',
	password:'demo'
}
var newRepo = {
	name:'myrepo',
	anonRead:false,
	users: [
		{ user:newUser, permissions:['R','W'] }
	]
}
_g = new GitServer([ newRepo ]);

The error

Store.prototype.__proto__ = EventEmitter.prototype;
                                         ^

TypeError: Cannot read property 'prototype' of undefined
    at Object.<anonymous> (G:\src\web\portal-development\git-wiki\git-wiki-server\git-wiki-server\node_modules\socket.io\lib\store.js:35:42)
    at Module._compile (module.js:660:30)
    at Object.Module._extensions..js (module.js:671:10)
    at Module.load (module.js:573:32)
    at tryModuleLoad (module.js:513:12)
    at Function.Module._load (module.js:505:3)
    at Module.require (module.js:604:17)
    at require (internal/module.js:11:18)
    at Object.<anonymous> (G:\src\web\portal-development\git-wiki\git-wiki-server\git-wiki-server\node_modules\socket.io\lib\manager.js:14:13)
    at Module._compile (module.js:660:30)
npm ERR! code ELIFECYCLE
npm ERR! errno 1
npm ERR! [email protected] start: `node ./bin/www`
npm ERR! Exit status 1
npm ERR!
npm ERR! Failed at the [email protected] start script.
npm ERR! This is probably not a problem with npm. There is likely additional logging output above.

npm ERR! A complete log of this run can be found in:
npm ERR!     C:\Users\yaseen\AppData\Roaming\npm-cache\_logs\2018-03-06T18_18_44_411Z-debug.log

Cannot push, `fatal: The remote end hung up unexpectedly`

It seems the server claims success right away and doesn't care about any further data sent.

Git log (german):

$ git push [remote]
[...]
Username for 'http://[server]:[port]': [user]
Password for 'http://[user]@[server]:[port]': 
Zähle Objekte: 36652, Fertig.
Delta compression using up to 4 threads.
Komprimiere Objekte: 100% (12361/12361), Fertig.
Schreibe Objekte: 100% (36652/36652), 6.87 MiB | 65.00 KiB/s, Fertig.
Total 36652 (delta 23074), reused 36314 (delta 22736)
error: RPC failed; result=55, HTTP code = 0
fatal: The remote end hung up unexpectedly
fatal: The remote end hung up unexpectedly
Everything up-to-date

Server log:

$ node index.js 
LOG:  Making repos if they dont exist
WARNING: No SSL certs passed in. Running as HTTP and not HTTPS.
Be careful, without HTTPS your user/pass will not be encrypted
LOG:  Server listening on  [port] 
LOG:  Got a FETCH call for [repo].git
LOG:  Got a FETCH call for [repo].git
LOG:  Got a FETCH call for [repo].git
LOG:  [user] is trying to fetch on repo: [repo] ...
LOG:  [user] Successfully did a fetch on [repo]
LOG:  Got a PUSH call for [repo].git
LOG:  [user] is trying to push on repo: [repo] ...
LOG:  [user] Successfully did a push on [repo]

Customize page

Hi, so I'm running it and works really really well, I love this project.

However, when I access with the browser, a "not found" message appears, and I was wondering if there is any way I could use an http object to manage this requests.

Thanks!

throw erro when push

events.js:85
throw er; // Unhandled 'error' event
^
Error: read ECONNRESET
at exports._errnoException (util.js:746:11)
at TCP.onread (net.js:559:26)

platform:window 2012 node -v 0.12.6

TypeError: Cannot read property 'length' of null

I used the example but something is wrong.
Can't figure what...

/home/git-server# node index

/home/git-server/node_modules/git-server/host.js:265
          if (results.length > 0) {
                     ^
TypeError: Cannot read property 'length' of null
    at /home/git-server/node_modules/git-server/host.js:265:22
    at /home/git-server/node_modules/git-server/node_modules/async/dist/async.js                                                :3327:9
    at /home/git-server/node_modules/git-server/node_modules/async/dist/async.js                                                :421:16
    at iteratorCallback (/home/git-server/node_modules/git-server/node_modules/a                                                sync/dist/async.js:998:13)
    at /home/git-server/node_modules/git-server/node_modules/async/dist/async.js                                                :906:16
    at /home/git-server/node_modules/git-server/node_modules/async/dist/async.js                                                :3319:13
    at /home/git-server/node_modules/git-server/node_modules/async/dist/async.js                                                :4256:13
    at Object.cb [as oncomplete] (fs.js:169:19)

This happens with node v0.1 to v6. v8 gives me this bug: #41

Any ideas?

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. 📊📈🎉

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google ❤️ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.