TE
TechEcho
Home24h TopNewestBestAskShowJobs
GitHubTwitter
Home

TechEcho

A tech news platform built with Next.js, providing global tech news and discussions.

GitHubTwitter

Home

HomeNewestBestAskShowJobs

Resources

HackerNews APIOriginal HackerNewsNext.js

© 2025 TechEcho. All rights reserved.

Ask HN: Gitlab or Gitea for self-hosting Git?

15 pointsby warrenmover 1 year ago
Use case needs:<p>- internal, small company (&lt;10 &quot;devs&quot; of any kind) development source control<p>- as lightweight as possible (but no lighter)<p>- support for &quot;common&quot; git clients (vscode, cli, atom, etc)<p>If it matters, most of the development work that will be going on is related to config file management, xml documents, scripts, etc - <i>for the foreseeable future</i>, we have no need for integrations into automated build systems<p>With those needs&#x2F;conditions in mind, would you pick Gitea, Gitlab, or something else ... and <i>why</i>?

16 comments

atmosxover 1 year ago
Go with Gogs.<p>Just makes sure you _really need_ to host your own git repo and it&#x27;s not some sort of overzealous security&#x2F;compliance measure. If you don&#x27;t trust github, gitlab, maybe sourcehut (<a href="https:&#x2F;&#x2F;sr.ht" rel="nofollow noreferrer">https:&#x2F;&#x2F;sr.ht</a> - no affiliation) is a good fit?<p>If you do setup an internal repo, makes sure you setup mirrors and&#x2F;or remote backups and a documented and tested disaster recovery scenario.<p>ps. if you don&#x27;t need a web interface, a UNIX server running SSH is just fine. Server side:<p><pre><code> $ mkdir -p Projects&#x2F;myeliteproject.git &amp;&amp; cd Projects&#x2F;myeliteproject.git $ git init --bare $ exit </code></pre> On the dev machine:<p><pre><code> $ mkdir -p Projects&#x2F;myeliteproject.git &amp;&amp; cd Projects&#x2F;myeliteproject.git $ git init $ git remote add origin ssh:&#x2F;&#x2F;[user]@[hostname]&#x2F;full&#x2F;path&#x2F;to&#x2F;the&#x2F;repo.git $ git push origin master $ echo &quot;We need this commit in order to avoid errors&quot; &gt; first_commit.txt $ git add first_commit.txt $ git commit (write a reason here... &quot;first needed commit&quot; is a good one) $ git push $ git config branch.master.merge &#x27;refs&#x2F;heads&#x2F;master&#x27; $ git config branch.master.remote origin $ git config --global push.default current (&lt;em&gt;This config is to avoid warning messages. Please read &lt;a href=&quot;http:&#x2F;&#x2F;progit.org&#x2F;book&#x2F;ch9- 5.html&quot;&gt;here&lt;&#x2F;a&gt; and consult documentation for refspecs&lt;&#x2F;em&gt;) $ git pull Already up-to-date. </code></pre> And if you need a web interface: <a href="https:&#x2F;&#x2F;git-scm.com&#x2F;book&#x2F;en&#x2F;v2&#x2F;Git-on-the-Server-GitWeb" rel="nofollow noreferrer">https:&#x2F;&#x2F;git-scm.com&#x2F;book&#x2F;en&#x2F;v2&#x2F;Git-on-the-Server-GitWeb</a> :-)
评论 #37534454 未加载
OrderlyTiamatover 1 year ago
There&#x27;s also the gitea fork <a href="https:&#x2F;&#x2F;forgejo.org&#x2F;" rel="nofollow noreferrer">https:&#x2F;&#x2F;forgejo.org&#x2F;</a> to consider if the reasons for the fork (FAQ) speak to you.<p>Now I don&#x27;t think this is a good idea, but since you specifically said as lightweight as possible I just wanted to mention it-<p>Running <i>just</i> git on an ssh accesible user is absolutely the most lightweight possible solution. You just need git and ssh, that&#x27;s it. It&#x27;s compatible with every normal git client, and does all the normal git stuff. This is how I manage my smaller personal projects (running on a raspberry pi), and it works fine for a single person.<p>There&#x27;s no CI&#x2F;CD. No Pull Requests, no web GUI, none of the niceties of any of the options mentioned here.<p>However if it&#x27;s really very lightly used, and by technically inclined people, it may be an option.<p>e: I stand corrected, there is apparently a web UI!
Visiting9950over 1 year ago
For my personal website I had the same question. I chose Gitea because it has a simpler stack than Gitlab can&#x27;t say much more than that. Gitea will work for your use case.<p>Consider looking at the financial cost of support for both. As a company your time fixing problems is what I think is the most important consideration. Initial setup time is a small price compared to lifelong maintenance.<p>For Gitea I never had any problems I didn&#x27;t create myself. But aren&#x27;t all problems like that. And I didn&#x27;t have a very complicated set up.
评论 #37524217 未加载
SamirPaulover 1 year ago
For a small company with your needs, I would recommend Gitea. It is a lightweight, self-hosted Git server that is easy to set up and manage. It also supports all of the common Git clients, including VSCode, the CLI, and Atom.<p>Gitea is a good choice for small companies because it is lightweight and easy to use. It also has all of the features that you need for basic source control management.<p>However, if you need integrations with automated build systems, then GitLab is a better choice. GitLab is a more powerful and feature-rich Git server, but it is also more complex to set up and manage.<p>Ultimately, the best choice for you will depend on your specific needs and requirements. If you are looking for a lightweight and easy-to-use Git server, then Gitea is a good option. If you need integrations with automated build systems, then GitLab is a better choice.
thepapanoobover 1 year ago
if you need CI&#x2F;CD gitlab. if you allready have CI&#x2F;CD with something like jenkins or whatever, or even if you dont need CI&#x2F;CD at all gitea.
评论 #37524203 未加载
atomicnatureover 1 year ago
Gitlab. The company could grow, and you&#x27;ll need more features, and you&#x27;ll likely lack time&#x2F;energy&#x2F;resources to deal with admin stuff like source control. Gitlab self-hosted is mostly painless to manage - the default installers just work as long as you have an instance dedicated to it, and on a day to day level it is not at all burdensome to operate.<p>Another key point is: software is not just software. Your team will develop habits and working style. It&#x27;ll be dead investment if you have to change software at a later time.
cvalkaover 1 year ago
Gitlab is a terrible piece of software engineering. Avoid it if you can afford it.
willhoyleover 1 year ago
There’s also <a href="https:&#x2F;&#x2F;onedev.io&#x2F;" rel="nofollow noreferrer">https:&#x2F;&#x2F;onedev.io&#x2F;</a> which deserves a mention. I’ve never personally used it but it looks promising.
Loxiconover 1 year ago
You could use a linux server with a bare repo as remote like atmosx said. And if you want a web interface just do:<p>&gt; git instaweb<p><a href="https:&#x2F;&#x2F;git-scm.com&#x2F;book&#x2F;en&#x2F;v2&#x2F;Git-on-the-Server-GitWeb" rel="nofollow noreferrer">https:&#x2F;&#x2F;git-scm.com&#x2F;book&#x2F;en&#x2F;v2&#x2F;Git-on-the-Server-GitWeb</a>
thesnideover 1 year ago
I did use <a href="https:&#x2F;&#x2F;gogs.io&#x2F;" rel="nofollow noreferrer">https:&#x2F;&#x2F;gogs.io&#x2F;</a> in the past. Was nice.<p>Not in the same league. But might be adequate for OP.
评论 #37527761 未加载
goku12over 1 year ago
This isn&#x27;t an answer, rather a wish. Since forgefed (git collaboration over activitypub) is coming up, I&#x27;m hoping for something lightweight and self-hostable. Cgit UI is nice. No need for namespaces - it doesn&#x27;t make sense for projects and individuals that self-host. Access control should be similar to what gitolite offers. (Basically Cgit + gitolite + forgefed + email - preferably single binary).
habitueover 1 year ago
Gitea is significantly easier to set up and maintain
thepraover 1 year ago
I&#x27;ve been hosting, maintaining and upgrading gitea for more than a year so far meanwhile at work I&#x27;ve been using the company&#x27;s Gitlab instance.<p>In general they work fine but Gitlab had many times upgrade issues resulting in downtimes more often than not. And Gitea resources use feels more light in general.
YaBaover 1 year ago
I&#x27;m pretty happy with Gitea, does the job, simple to set up and now it support actions with multiple runners.<p>Tried gitlab, was a nightmare to set up and consumed a lot of resources.
评论 #37540614 未加载
remramover 1 year ago
Gitea is lighter, GitLab has more features. Look at the Gitea features list and see if it works for you.<p>Obviously both are Git hosting platforms so I&#x27;m not sure what more we can do for you.
c0baltover 1 year ago
Gitea, as someone using GitLab. Both will intefrate with editors though GitLab&#x27;s MR&#x2F; Issues tend to have more mature integrations (if you want that in your editor).<p>GitLab is good for teams or when you want to play with a fully featured CI&#x2F;CD and have a solid Issue&#x2F; MR System. It however is also quite a hassle to maintain sometimes though the omnibus installations have gone a long way. Also be prepared to spare some RAM.<p>Gitea on the other hand is light and comes with some QoL things like non-paywalled Repository mirroring and compatibility with GitHubs CI. It&#x27;s also a bit snappier and very easy to run. The ressource usage also reflects this both from disk space and RAM.<p>It&#x27;s kinda like comparing vscode to a full blown IDE.