Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Serve bare git repo from a remote server? #54

Open
saoudrizwan opened this issue Apr 4, 2019 · 6 comments
Open

Serve bare git repo from a remote server? #54

saoudrizwan opened this issue Apr 4, 2019 · 6 comments

Comments

@saoudrizwan
Copy link

Hello, firstly - thanks for the amazing repo.

I understand that in your implementation (and stackdot's), 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!

@gilbert
Copy link

gilbert commented Apr 19, 2019

I would like to know the answer to this too. Bonus points for proxying to another git server like GitHub itself!

@akif-ih
Copy link

akif-ih commented Oct 24, 2019

I am facing this problem too, i want to host all my repos to s3 instead of my own server and clone them using the same method.

@akif-ih
Copy link

akif-ih commented Oct 24, 2019

@gabrielcsapo Please could u help or can guide us ?

@luzzif
Copy link

luzzif commented Jun 12, 2020

+1, this would be super nice (I could also contribute if needed)

@chmac
Copy link
Contributor

chmac commented Aug 27, 2020

This question is quite old, but having spent a little time in the node-git-server code, I think the answer to this is not easily.

This package calls git on the host's operating system like so:

const cmd = os.platform() == 'win32' ?
['git', opts.service, '--stateless-rpc', opts.cwd]
:
['git-' + opts.service, '--stateless-rpc', opts.cwd];
const ps = spawn(cmd[0], cmd.slice(1));

Converting that to instead using streams and pulling from remote hosts would, in my opinion, be a lot of work. Also, if you check the philosophy section of this package, it aims to have zero dependencies. Adding streaming from remote hosts would definitely require dependencies.

@vadolasi
Copy link

I found a solution for this, maybe not the best of all but it works well:

There are some tools like s3fs and goofys that allow you to mount an s3 bucket on the filesystem.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

6 participants