Live data from Hacker News

Self-Hosting Git

peppe.rs

11–20 of 71 posts

Re: Self-Hosting Git

#11

A worthy self-hostable Git Server too if you'd like to give it a try: https://www.scm-manager.org/

And if you need less than that you can do a lot just with SSH and file system permissions for read only deploy keys. I wrote a script that uses a directory structure with sym-linked ssh keys as a config for a to add/edit/remove ssh access. It appeals to me because I had gitlab for our 2 person team and it was just wrong sized for us. So many features went unused. Frequent upgrades meant an increasingly powerful serve…

I find that gitlab is generally overkill. Gitea [0] is quite simple to deploy and uses much less resources. If you do want CI/CD later, you can integrate a self-hosted Drone [1] instance.

[0]: https://github.com/go-gitea/gitea

[1]: https://github.com/drone/drone

Re: Self-Hosting Git

#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?

Re: Self-Hosting Git

#13
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.

Re: Self-Hosting Git

#14
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 thanks for the tips.

Re: Self-Hosting Git

#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.

Re: Self-Hosting Git

#16
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.

I prefer to think they do and simply omitted "web interface" from the title.

Edit: Was a response to edited-out "Do people not know you can self host git using ... git?"

Re: Self-Hosting Git

#17
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.

Re: Self-Hosting Git

#18

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…

The most naive git server is a place you can ssh into that has git installed and disk space.

You can set it as a remote.

A git server is not required. You can just run it locally or even use another folder as a remote.

Re: Self-Hosting Git

#19

A worthy self-hostable Git Server too if you'd like to give it a try: https://www.scm-manager.org/

And if you need less than that you can do a lot just with SSH and file system permissions for read only deploy keys. I wrote a script that uses a directory structure with sym-linked ssh keys as a config for a to add/edit/remove ssh access. It appeals to me because I had gitlab for our 2 person team and it was just wrong sized for us. So many features went unused. Frequent upgrades meant an increasingly powerful serve…

If you've got a small team such that managing SSH keys is reasonable, you can just keep using git over SSH and add CI/CD via githooks. It's honestly very, very easy - put an appropriately-named shell script in the directory and git automatically executes it. Just make a script called post-receive that kicks off your process when a push has been made. The script will receive all the information it needs to know what branch/ref changed.

https://git-scm.com/docs/githooks

Re: Self-Hosting Git

#20

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.

Also worth checking Gitea (https://gitea.io/en-us/) which is a popular fork of Gogs.
Post reply on HN