Hacker Newsnew | past | comments | ask | show | jobs | submit | szek's commentslogin

I was writing a similar cli tool [1] to manage the git repositories on my own server. If you want portability, it should be fairly easy to write the cli interface in plain sh or bash, especially when most of the operations could be done on the server side. I am not sure if there is a reason to use a compiled language for this.

[1]: https://0x0.st/8zs0


Thanks for sharing that's awesome!

Bookmarked. I'll think more about implementing it as a shell script.


This is the correct answer.


I think the point is not about backups. It is really, really easy to set up a remote git repository. Everything is nicely documented in chapter 4 of Pro Git [1]. Because a git remote is nothing more than a plain directory, you could serve a git repo anywhere you could store files, even on your own disks.

If multiple people need push access to a private repository, just serve a central repository as on a VPS and use SSH for authentication. I am not sure if there is a reason to use a third party hosting service for this, especially when hosting private repos.

[1]: https://git-scm.com/book/en/v2/Git-on-the-Server-Getting-Git...


> just serve a central repository as on a VPS and use SSH for authentication

Reminds me of this comment https://news.ycombinator.com/item?id=9224

Edit: I don't mean to dismiss your comment. I just mean to say I'm obviously comfortable doing what you described but it's not a trivial amount of effort even if it is conceptually straightforward.


It's a little bit of work, but really it's surprising how well Git works with the dumbest servers. I run a number of Git mirrors off a $5 VPS served from a folder that I run python3 -m http.server in; it's literally just that and it works beautifully.


And what about ssl?


Ignored ;)


Agreed, git is great!


Guidelines | FAQ | Lists | API | Security | Legal | Apply to YC | Contact

Search: