Live data from Hacker News

Self-Hosting Git

peppe.rs

21–30 of 71 posts

Re: Self-Hosting Git

#21
post #12

Git web interfaces should be Bring Your Own, really. I never bother using those as I can have a consistent interface inside emacs. Why should the repository owner choose which interface you view it on?

Because most self-hosted Git services like Gogs and Gitea include features not part of git, such as pull requests, releases, and issues, which require some kind of database.

Re: Self-Hosting Git

#22

Interesting! recently I started self-hosting my personal repos using gogs ( https://gogs.io/ ) it’s really lightweight, and I can evn run it in an arm64 box (the same one I use for my NAS). If you’re looking for a more complete yet still lightweight alternative, give gogs a look.

Does it have a single user mode?

Re: Self-Hosting Git

#23
post #12

Git web interfaces should be Bring Your Own, really. I never bother using those as I can have a consistent interface inside emacs. Why should the repository owner choose which interface you view it on?

I really don't want to have to pull an entire repo to check something out. I read open source code waaaaaaaaaaay more than I have any need to actually run it or do anything to it locally.

Shallow clones are really useful for that:

  git clone —-depth 1 …

Re: Self-Hosting Git

#24
post #12

Git web interfaces should be Bring Your Own, really. I never bother using those as I can have a consistent interface inside emacs. Why should the repository owner choose which interface you view it on?

I really don't want to have to pull an entire repo to check something out. I read open source code waaaaaaaaaaay more than I have any need to actually run it or do anything to it locally.

Partial/shallow clone is a git feature.

Re: Self-Hosting Git

#26
post #15

It's not really self hosting git. It's self hosting a web interface to git. I swear 90% of people who use git don't know you can just push/pull directly from another computer's git repos.

[deleted]

Re: Self-Hosting Git

#27

Probably a naive question, but is a git server required? Could one imagine a git repository stored as static files (e.g. in a cloud bucket), and the client then runs git the functionality. Or, a "serverless" git, with cloud functions? (I guess concurrent writing would be an issue.) EDIT: I don't mean ssh'ing to a server with git installed on it. I was thinking of a git-based protocol but based on static files. But th…

All you need is a web server, if you accept patches by email.

Re: Self-Hosting Git

#28

Interesting! recently I started self-hosting my personal repos using gogs ( https://gogs.io/ ) it’s really lightweight, and I can evn run it in an arm64 box (the same one I use for my NAS). If you’re looking for a more complete yet still lightweight alternative, give gogs a look.

What arm 64 box do you use? RPi4? I'm interested in having my own NAS but I want it to be seamless as possible, and I'm not sure if a raspberry pi would achieve that. That being said, I also don't want to spend too much lol... Perhaps I'm asking for much here

Re: Self-Hosting Git

#29

Probably a naive question, but is a git server required? Could one imagine a git repository stored as static files (e.g. in a cloud bucket), and the client then runs git the functionality. Or, a "serverless" git, with cloud functions? (I guess concurrent writing would be an issue.) EDIT: I don't mean ssh'ing to a server with git installed on it. I was thinking of a git-based protocol but based on static files. But th…

That's how Git already works, eg. over SSH or even HTTP.

Simple git server over SSH:

    local> ssh example.com
    example.com> git init --bare code
    example.com> exit
    local> git clone example.com:code
Nothing required on the remote side other than an SSH server. Works with multiple users, too - just use SSH auth.

Re: Self-Hosting Git

#30

Probably a naive question, but is a git server required? Could one imagine a git repository stored as static files (e.g. in a cloud bucket), and the client then runs git the functionality. Or, a "serverless" git, with cloud functions? (I guess concurrent writing would be an issue.) EDIT: I don't mean ssh'ing to a server with git installed on it. I was thinking of a git-based protocol but based on static files. But th…

you can read up on the --bare option but you can point git to a remote location such as a network drive or even a local folder (I don't recommend this of course) but my point is there is no hard restriction within git as to where it is hosted.

A long time ago when I was working in a company that still prescribed SVN, I used a backed up network drive location as the location for my git bare repos, I just used it to manage prototypes or feasibility work nothing serious but it was more familiar and productivity for me than the accepted SVN workflow.

Post reply on HN