TE
科技回声
首页24小时热榜最新最佳问答展示工作
GitHubTwitter
首页

科技回声

基于 Next.js 构建的科技新闻平台,提供全球科技新闻和讨论内容。

GitHubTwitter

首页

首页最新最佳问答展示工作

资源链接

HackerNews API原版 HackerNewsNext.js

© 2025 科技回声. 版权所有。

Poll: Self Hosting Git Repositories

64 点作者 gmemstr大约 3 年前
I'm looking to setup a git host to at the very least mirror my git repositories, but more likely to migrate to full time. Suggestions are welcome, but I'm also curious what HN uses!

44 条评论

rapnie大约 3 年前
Gitea (originally a fork of Gogs) is moving fast, and they are adding ActivityPub federation support to the software. This will allow you to collaborate with projects hosted on remote Gitea instances (and other software once they add federation support too). If you are working on FOSS then Codeberg [1] is a good Gitea instance, which offer Woodpecker CI and Codeberg Pages.<p>[1] <a href="https:&#x2F;&#x2F;codeberg.org" rel="nofollow">https:&#x2F;&#x2F;codeberg.org</a>
评论 #31433639 未加载
评论 #31440911 未加载
评论 #31433276 未加载
评论 #31435789 未加载
iveqy大约 3 年前
if it&#x27;s for personal use and no access rights are needed, just use ssh.<p>If you need to add more people, but don&#x27;t require access right for the git repos (i.e. everyone will be able to force push). Still use ssh, but create a git user and git-shell as the shell to improve security.<p>If you want to go one step up, I was looking at soft-serve, however it&#x27;s too immature yet. So I added a git-shell-commands folder and added list command that will list my git repos.<p>It&#x27;s really simple!<p>If you need access rights and reviews, things will be a bit more complicated. Although git-shell seems pretty easy to add some access rules to, if not gitolite is better. For browsing, cgit and gitweb should be obvious choices, however I don&#x27;t really see the point for a minor site.<p>For code review, I&#x27;m really voting for git-appraise to take off. Once I get a coworker, that&#x27;s what we will be using.
评论 #31433247 未加载
评论 #31438838 未加载
评论 #31433653 未加载
eixiepia大约 3 年前
Anything else than GitLab, it&#x27;s so slow and bloated. With every &quot;update&quot; it seems to get even slower and depend even more on javascript. I really hate how so many open source projects shifted to this abnormation because Microsoft acquired GitHub, I mean, regardless of what evil shit Microsoft could think up, it can&#x27;t be worse than having to deal with this javascript turd. If your web interface can&#x27;t even just display simple information like issues page or merge requests, without depending on a huge pile of steaming javascript, you have FAILED in web design. I cry every time I&#x27;m forced to use GitLab. Just my two cents.
i0nutzb大约 3 年前
You may want to give more details about your usecase: do you need _only_ git hosting or other features too (e.g. issue tracker, CI&#x2F;CD pipelines)? How many users will use this setup? Do you have a dedicated machine or you run it locally (e.g. in a docker container?? Hosting locally or in cloud?<p>IIRC Gitolite was aquired by Gitlab a while back, Gitweb is not really a git hosting, it&#x27;s more like a web view of your `git log`<p>Gitlab needs at least a couple of gigs of RAM to run well, double&#x2F;triple that if you need CI&#x2F;CD.<p>I have no experience wiht gogs&#x2F;gitea.
评论 #31433754 未加载
评论 #31433055 未加载
bananaramallama大约 3 年前
If you don&#x27;t need a front-end, push and pull directly from git. <a href="https:&#x2F;&#x2F;git-scm.com&#x2F;book&#x2F;en&#x2F;v2&#x2F;Git-on-the-Server-Setting-Up-the-Server" rel="nofollow">https:&#x2F;&#x2F;git-scm.com&#x2F;book&#x2F;en&#x2F;v2&#x2F;Git-on-the-Server-Setting-Up-...</a>
评论 #31433328 未加载
8fingerlouie大约 3 年前
Gitea all the way.<p>Lightweight (can run on a RPi unlike GitLab), does everything you expect, can work with SQLite or MySQL&#x2F;MariaDB or PostgreSQL, and can sync remote (GitHub&#x2F;Bitbucket&#x2F;whatever) repositories locally.
gspr大约 3 年前
I voted &quot;other&quot;: I just put bare git repositories on my VPS, and interact with them over SSH. Tiny and simple cgit exposes a read-only HTTPS interface for the repos that I want to share publicly.
评论 #31433496 未加载
arichard123大约 3 年前
I use ssh, and a script that manages ssh keys and system user accounts, with a umask change and some symlinks. This means I can add read-only ssh access for deployment keys. The remote address would be of the form ssh:&#x2F;&#x2F;{clientname}[-ro]@domain:port&#x2F;~&#x2F;repos&#x2F;{reponame}.git<p>The [-ro] gives the readonly access. I use git-shell to prevent normal ssh access to the server on those accounts.
评论 #31433391 未加载
lf-non大约 3 年前
You may also want to include onedev [1][2] in your exploration (<a href="https:&#x2F;&#x2F;code.onedev.io&#x2F;" rel="nofollow">https:&#x2F;&#x2F;code.onedev.io&#x2F;</a>) if you also need good CI&#x2F;CD integration.<p>My experience (as a user) has been pretty good, though I was not involved in the adminstration&#x2F;setup related aspects but I have been told it doesn&#x27;t require a lot of maintenance effort.<p>[1] <a href="https:&#x2F;&#x2F;github.com&#x2F;theonedev&#x2F;onedev" rel="nofollow">https:&#x2F;&#x2F;github.com&#x2F;theonedev&#x2F;onedev</a> [2] <a href="https:&#x2F;&#x2F;code.onedev.io&#x2F;" rel="nofollow">https:&#x2F;&#x2F;code.onedev.io&#x2F;</a>
评论 #31436446 未加载
brynb大约 3 年前
I made Redwood, a general purpose p2p&#x2F;distributed database (and blob store) with pluggable merge algorithms (including some cool CRDTs, like what @josephg is working on).<p>Turns out it makes for a great self-hosted git solution, so I made a git remote plugin that allows you to interact with it using regular vanilla git commands: <a href="https:&#x2F;&#x2F;github.com&#x2F;redwood&#x2F;redwood&#x2F;tree&#x2F;libp2p-connectivity2&#x2F;demos&#x2F;git-integration" rel="nofollow">https:&#x2F;&#x2F;github.com&#x2F;redwood&#x2F;redwood&#x2F;tree&#x2F;libp2p-connectivity2...</a>
hamdouni大约 3 年前
Gitea+drone [0] for all my projects for several years : dockerized for even more simplicity. An update is nearly just &#x27;compose pull &amp;&amp; compose up&#x27;.<p>[0] <a href="https:&#x2F;&#x2F;www.drone.io&#x2F;" rel="nofollow">https:&#x2F;&#x2F;www.drone.io&#x2F;</a>
harryvederci大约 3 年前
I know this specifically asks for git, but I just want to mention fossil[0] here as it has git export, a built-in wiki + ticket system, etc, and is incredibly easy to self-host.<p>[0] <a href="https:&#x2F;&#x2F;fossil-scm.org&#x2F;" rel="nofollow">https:&#x2F;&#x2F;fossil-scm.org&#x2F;</a> (created by Richard Hipp, the guy that made SQLite)
stevekemp大约 3 年前
I used to use a self-hosted instance of gitbucket:<p><a href="https:&#x2F;&#x2F;github.com&#x2F;gitbucket&#x2F;gitbucket" rel="nofollow">https:&#x2F;&#x2F;github.com&#x2F;gitbucket&#x2F;gitbucket</a><p>That&#x27;s a single .WAR file, running under Java which was nice and easy to get started with, and even has support for some trivial CI&#x2F;CD actions. Unfortunately a sudden death of the docker container it was running with corrupted the internal database to the extent that it wouldn&#x27;t restart. (All my repositories were fine, on-disk, but the issues and similar stuff was mangled beyond belief.)<p>At that point I realized that I didn&#x27;t use the issues, or pull-request facilities except very very rarely, so I switched to using bare repositories on a remotely hosted virtual-server.
Tinkeringz大约 3 年前
While I have not used it, softserve looks like a cool terminal&#x2F;SSH based remote git server.<p><a href="https:&#x2F;&#x2F;github.com&#x2F;charmbracelet&#x2F;soft-serve" rel="nofollow">https:&#x2F;&#x2F;github.com&#x2F;charmbracelet&#x2F;soft-serve</a>
angst_ridden大约 3 年前
I just host on my VPS and use ssh to access. My VPS gets imaged nightly (for one kind of backup) and versioned back ups using Restic.<p>I only collaborate with folks who I trust enough to give accounts, which means most are just personal repos.
rollcat大约 3 年前
SourceHut (<a href="https:&#x2F;&#x2F;sr.ht" rel="nofollow">https:&#x2F;&#x2F;sr.ht</a>) is open source, although I&#x27;ve never tried setting it up for self-hosting. Anyone here with experience?
评论 #31433420 未加载
stillbourne大约 3 年前
I run gitlab on my kube cluster and installed that via helm charts and configured the omniauth system to communicate with my keycloak server via oidc. Overall complexity 6&#x2F;10 took about 5 hours to fuss with it the first time. Subsequent deployments became easier. I hear Gitea is also a good selfhosted solution and less complex to install. However, I went with Gitlab specifically because we use it at work and I want to practice gitops&#x2F;devops with it.<p><a href="https:&#x2F;&#x2F;docs.gitlab.com&#x2F;charts&#x2F;installation&#x2F;" rel="nofollow">https:&#x2F;&#x2F;docs.gitlab.com&#x2F;charts&#x2F;installation&#x2F;</a>
lifepillar大约 3 年前
I wonder whether people monitor resources consumed by processes… A couple of years ago I had installed Gitea, but it was constantly using between 5-10% CPU. I switched to Gogs, and it doesn’t waste CPU cycles. So, I have stayed with Gogs. My needs are minimal (self-hosting for personal use), so I could probably switch to something even more minimal, but so far Gogs works fine.
camgunz大约 3 年前
I use stagit along with <a href="https:&#x2F;&#x2F;hosakacorp.net&#x2F;p&#x2F;stagit-server.html" rel="nofollow">https:&#x2F;&#x2F;hosakacorp.net&#x2F;p&#x2F;stagit-server.html</a> and basic auth for private repos. Works amazingly. I mess with it so infrequently I constantly forget the name of it (say it three times! stagit stagit stagit!)
gonewest大约 3 年前
We&#x27;re serving git over https using apache2, where apache handles authentication via LDAP. We also serve subversion repos with a similar setup. We use separate web services for search, code review, CI, and issue tracking.<p>Running this way does involve more moving parts, but every part is relatively self-contained and we can replace one thing without disrupting everything.<p>[Edit] one other benefit I should add, all the other services like code review and CI are compatible with git and svn, so the development teams have consistent tools regardless which vcs they&#x27;re running for a particular project.
_cbdev大约 3 年前
I prefer to do my project management in in disjunct tools from the actual source control (and I dislike the tech stack of most integrated solutions), so my main repository host is running fugit[1], which simply allows push&#x2F;pull access on a per-ssh-key basis. Some repositories are then exposed to the Web using cgit[2]<p>[1] <a href="https:&#x2F;&#x2F;github.com&#x2F;cbdevnet&#x2F;fugit" rel="nofollow">https:&#x2F;&#x2F;github.com&#x2F;cbdevnet&#x2F;fugit</a> [2] <a href="https:&#x2F;&#x2F;git.zx2c4.com&#x2F;cgit&#x2F;" rel="nofollow">https:&#x2F;&#x2F;git.zx2c4.com&#x2F;cgit&#x2F;</a>
markphip大约 3 年前
You should add Gerrit to your list: <a href="https:&#x2F;&#x2F;www.gerritcodereview.com" rel="nofollow">https:&#x2F;&#x2F;www.gerritcodereview.com</a><p>Gitweb does not belong, it is just a repository viewer.
rvz大约 3 年前
As long as you are not looking to go totally all in [0] on GitHub or any SaSS based solution then either self-host solution option is fine.<p>ReactOS is a fine example of this: [1]<p>[0] <a href="https:&#x2F;&#x2F;news.ycombinator.com&#x2F;item?id=22867803" rel="nofollow">https:&#x2F;&#x2F;news.ycombinator.com&#x2F;item?id=22867803</a><p>[1] <a href="https:&#x2F;&#x2F;github.com&#x2F;reactos&#x2F;reactos#code-mirrors" rel="nofollow">https:&#x2F;&#x2F;github.com&#x2F;reactos&#x2F;reactos#code-mirrors</a>
captn3m0大约 3 年前
I sync stuff via the Gitea mirror feature. Works well.
评论 #31433214 未加载
wink大约 3 年前
My main repos are all on Github (a few on bitbucket from back when Github did not have free private repos... how many years ago was that?) and I mirror them all with a simple cronjob of &quot;git pull --rebase&quot; (this gets into the normal backup cycle then)<p>I used to run gitolite (pre Github&#x27;s existence :P) and I&#x27;m thinking about gitea, but for now I am very happy with my setup.
dividedbyzero大约 3 年前
For those on Gitea: What CI (if any) are you using?
评论 #31435471 未加载
评论 #31438696 未加载
zeckalpha大约 3 年前
No need to mirror as each checkout is a mirror. I just maintain checkouts of all the things with <a href="https:&#x2F;&#x2F;myrepos.branchable.com&#x2F;" rel="nofollow">https:&#x2F;&#x2F;myrepos.branchable.com&#x2F;</a>
sebazzz大约 3 年前
Gitea is the best thing that comes near Github is you are resource constrained.
ww520大约 3 年前
Voted others. Just ssh into a Linux server. Have a special user account ‘git’ on the server to hold all the repos so they can just reside at the base directory of its home.<p>Access via ssh:&#x2F;&#x2F;git@server:~&#x2F;myproj1.git.
XorNot大约 3 年前
I have a git folder in my home directory that I use syncthing to mirror.<p>I guess I would like a web interface that ran locally to provide other features, but the close to 0-maintenance and complete privacy of this works for me.
CommanderData大约 3 年前
Used to host gitlab on my Synology. But it&#x27;s so resource heavy I stopped. Also the migrations between versions weren&#x27;t always pain free and costed me many hours of my time.<p>I&#x27;m looking at alternatives.
评论 #31436206 未加载
rascul大约 3 年前
Gitea is great, and there&#x27;s this reference getting more out of it:<p><a href="https:&#x2F;&#x2F;gitea.com&#x2F;gitea&#x2F;awesome-gitea" rel="nofollow">https:&#x2F;&#x2F;gitea.com&#x2F;gitea&#x2F;awesome-gitea</a>
livelace大约 3 年前
Gitea. Also, there are GitNex (mobile app for Gitea) and Jenkins plugin.
second--shift大约 3 年前
Gogs &#x2F; gitea fan here. Used both, can recommend either. One-liner docker command to set up &amp; a simple docker-compose.yml to declare everything in one place.
durnygbur大约 3 年前
SSH access through an user with git-shell as the shell. git init --bare on remote. Hosted on the tiniest VPS instance available.
nullbytesmatter大约 3 年前
I highly, highly recommend cgit. It&#x27;s a lot safer than hosting accounts, databases, etc. It&#x27;s a read only frontend for bare repositories.
fullstop大约 3 年前
I&#x27;m still running gitosis over here because of technical baggage. If I had the time and energy to escape it, I&#x27;d move to gitolite.
alfiedotwtf大约 3 年前
For personal stuff, I use an s3 bucket that&#x27;s mounted locally via FUSE as the origin. A bit slow, but works out of the box!
jdright大约 3 年前
Radicle <a href="https:&#x2F;&#x2F;radicle.xyz&#x2F;" rel="nofollow">https:&#x2F;&#x2F;radicle.xyz&#x2F;</a>
vesinisa大约 3 年前
GitLab has a decent CI functionality baked in, should it ever come to need.
dancemethis大约 3 年前
Fork Gitea, remove Discord references for safety, perfect.
stn_za大约 3 年前
Suggestion: Don&#x27;t.*<p>But, if you have your mind set: GitLab is great.<p>(It WILL break at one point or another, and you will need to do recovery)
评论 #31433189 未加载
1MachineElf大约 3 年前
SourceHut
blaise-pabon将近 3 年前
charm.sh softserve