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

科技回声

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

GitHubTwitter

首页

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

资源链接

HackerNews API原版 HackerNewsNext.js

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

Self-hosted Git Server

115 点作者 emilyst大约 11 年前

14 条评论

jmoiron大约 11 年前
I spent years out in the woods with my own projects page that nobody could find and very few cared about, happily cutting trees down with nary a witness. I wanted control over backups, presentation, availability. I was terrified of relying on services that could disappear. I found self promotion distasteful, and I was happy to do the work just for its own sake, for the enjoyment of that process.<p>But then I wrote something people actually used. And they wanted it on Bitbucket, and then on Github, so they could contribute to it and track its progress.<p>Now that I&#x27;ve come in from my Zen training out in the wilderness, I feel that the old me who wanted &quot;control&quot; over all of my creations was immature and selfish, abstaining from participation in a community and helping no one but myself. I think that the social aspect of hosted coding sites, both for collaboration and exposure, is much more valuable than the control you get from running the whole show yourself.
评论 #7412134 未加载
评论 #7412438 未加载
lholden大约 11 年前
The fantastic thing about distributed version control systems like GIT is that you never actually <i>have</i> to depend on a single repository.<p>Use Github, Bitbucket, and your own &quot;server&quot; all at once. None have to be read-only. Push and pull from multiple sources.<p>Decide that Github is no longer the place for you? No problem! People contributing to your projects should already know where to push to reach everywhere it needs to go and they only need to stop pushing to github.<p>No reason to rely on a &quot;central&quot; repo.
评论 #7412350 未加载
geerlingguy大约 11 年前
Here&#x27;s another example, using Ansible and a few simple roles from Ansible Galaxy: <a href="https://github.com/geerlingguy/ansible-vagrant-examples/tree/master/gitlab" rel="nofollow">https:&#x2F;&#x2F;github.com&#x2F;geerlingguy&#x2F;ansible-vagrant-examples&#x2F;tree...</a><p>Give Vagrant + Ansible about 15 minutes, and you&#x27;ll have a nice little local GitLab server running. Modify the Ansible playbook slightly, to point it at a VM on Digital Ocean or elsewhere, and you&#x27;ll have a nice little hosted copy of something like GitHub.<p>I run an instance of GitLab on a Digital Ocean droplet, and back it up to a cheap RamNode VPS; all my GitHub repos are pulled daily to repos on the GitLab server (for backup purposes—I use the GitHub repos primarily), and I also use this GitLab server as a central repo to which I push changes for my sites&#x2F;services, and pull from on production servers.<p>There are many good reasons to put certain repositories on GitHub, and there are some good reasons to host some repositories yourself (or to just have one local working copy, with a backup).
评论 #7412920 未加载
评论 #7415386 未加载
tenfingers大约 11 年前
I also use my private repositories (simply setup using gitolite), but I simply also push to GitHub for the added discoverability.<p>I tend not to like GitHub however. The wiki&#x2F;issue tracker actually require you to be online, which is the best thing about git: being able to work without network connection.<p>I&#x27;d like to find some project that syncs github issues with sd (<a href="http://syncwith.us/sd/" rel="nofollow">http:&#x2F;&#x2F;syncwith.us&#x2F;sd&#x2F;</a>) or bugseverywhere (<a href="http://www.bugseverywhere.org/" rel="nofollow">http:&#x2F;&#x2F;www.bugseverywhere.org&#x2F;</a>), so that I could actually work on the issues without being online (the bigger pain point are attachments which need to be downloaded).<p>Another thing which I consider inferior to patches by mail are pull requests. Honestly, it&#x27;s very rare that I can accept a patch without some reformatting or minor corrections. I also never ask people to do such minor reformatting just to be able to click &#x27;accept&#x27;. Again, pull requests cannot be worked-on or accepted offline. Similarly, my patches sent to other projects are similarly handled by other authors.
评论 #7418169 未加载
taylorlapeyre大约 11 年前
An elegant solution for you, no doubt.<p>However, I couldn&#x27;t part with the excellent tools that GitHub has developed (and will continue to develop) over the years.
评论 #7412053 未加载
Nux大约 11 年前
Also check <a href="https://github.com/takezoe/gitbucket" rel="nofollow">https:&#x2F;&#x2F;github.com&#x2F;takezoe&#x2F;gitbucket</a> Installation is as easy as downloading it and running:<p>java -jar gitbucket.war
评论 #7412377 未加载
szhu大约 11 年前
It looks there are two main reasons to have a private Git server: to archive your own code, and to have control over how visitors and collaborators view your shared code.<p>If you want a place to store or archive personal projects (because you don&#x27;t want to pay for private Git hosting?) features like wikis and issues become rather irrelevant, and if you want to move that data to or from GitHub, that takes some effort to be explicitly exported instead of just adding a new remote.<p>If you&#x27;re trying to keep your own code, running your own Git server is simple if you have SSH (or not even SSH if you want to create a local &quot;server&quot;). The Git website has a simple tutorial for this: <a href="http://git-scm.com/book/en/Git-on-the-Server-Setting-Up-the-Server" rel="nofollow">http:&#x2F;&#x2F;git-scm.com&#x2F;book&#x2F;en&#x2F;Git-on-the-Server-Setting-Up-the-...</a><p>I&#x27;ve also simplified this workflow into a tiny command, &quot;mygit&quot;: <a href="https://github.com/interestinglythere/mygit" rel="nofollow">https:&#x2F;&#x2F;github.com&#x2F;interestinglythere&#x2F;mygit</a><p>As for running a GitHub clone, unless you have some really edge-case needs or you really don&#x27;t want to pay for private collaborative repos, your time is probably better spent maintaining your actual code. In addition, having your code on a social site will make it more receptive to contributors. If you don&#x27;t want contributors, why do you need a &#x2F;Git&#x2F; server? (If it&#x27;s because that&#x27;s how you like to manage your code, see my first point.)
hipaulshi大约 11 年前
Well. I have to be honest. I used to do just that. And it is not fun to worry about backups and server breaking down. Outsourcing this part to Github will probably save a lot of developer&#x2F;IT headache if you are a small company.
mixologic大约 11 年前
What about all the problems that are inherent to hosting <i>anything</i> ? It&#x27;s not hard to set up a server that will respond to a request and deliver data.<p>It&#x27;s hard to make it do that when the power goes out, when you anger somebody and they decide to ddos you, or when your code&#x2F;service&#x2F;whatever becomes insanely popular and whatever mac mini you run it on is overheating. It&#x27;s hard to keep up with all the security patches required to keep your box from getting pwned. It&#x27;s hard to negotiate the fine print with all the TOS&#x27;s you&#x27;ve signed with your internet provider.
评论 #7414789 未加载
616c大约 11 年前
I checked out this guy&#x27;s site. I understand he is reinventing the wheel. I respect that and do not mean anything negative about that. A lot of us are here to understand the wheel and build for ourselves. There is good value for that.<p>What I do not understand, with all due respect, is the value of Github, and to a lesser extent Bitbucket, is in the features outside of the VCS core and how most people realize there is nothing Git-like to replace the actual project management tools where people find Github value. That is, bug tracking&#x2F;issue tracking is the killer feature.<p>To self-host this is problematic. This is not to say there are not good solutions. Traditionally that is Bugzilla, Trac, Redmine, and more recently a la ArchLinux and Music Player Daemon (MPD) I have seen Mantis BT. It looks interesting. The problem is, as others point out, maintenance, and adding the centralized to the decentralized, thus the point of Git, Mercurial, and others. I noticed this guy hosts his own repos (I tried links to bugsplat.rb) and it did not load, but I assume there is not bug tracking, despite the name.<p>Even this year, I decided to look into the state of DVCS integrated bug tracking. Very few tools exist, or many have problems. BE, bugseverywhere, kind of exists and has seen contributions as of last year. Ticgit was forked to ticgit-ng, but ironically that is a Github project and its bugs are in the Github issue tracker. There was a very cool Perl project, which seems abandoned, called SimpleDefects (SD), which also wanted to do distributed bug tracking. It was going to sync with Github and other issue tracker systems with decentralizaton, so you could git pull for bugs as well. This one has not seen updates for years, as I can tell, but might be the coolest of them.<p>Unfortunately, keeping you whole project decentralized is difficult. I have begun to look into fossil again, despite what people here say, because it might be ugly, but no VCS has its own bug tracker or wiki integration, all written in C. It is the SCM and bug tracker for Sqlite, Tcl, and even for all of NetBSD packages. The last really surprised me. I think for the little guy, that is ideal. Monotone might be worth revisiting (I had multiple problems 3 or 4 months ago because it was embedding Lua and they had not come up to the 5.1-5.2 API changes and builds failed; everyone is hard to find), even with the only data about it is there page and links to snarky Linus Torvalds jokes about the horror of OO data structures and modern C++ programming for a SCM.<p>In short, you should know to host your own Git repos (they are designed, with the native package tools in Git or others) to host simply on a website. It is best for even the lowest footprint web servers, shared hosting or not.<p>What git does not have, is the beautiful features that keep people on Github all day. I really wish distributed bug tracking advanced, but no one is interested. This topic only comes up when Github is down (or maybe in this case but Github is having publicity problems today). If people made a good tool like SD, that has its own bug tracking that syncs well with Github or (insert hosted SCM here), that would be fantastic. I could be more relaxed, principally, by relying on such tools.<p>Back to read the Fossil manual.
评论 #7414773 未加载
评论 #7414635 未加载
评论 #7413658 未加载
评论 #7413164 未加载
评论 #7413076 未加载
评论 #7414108 未加载
aleprok大约 11 年前
I have registered in January 27 2009 to github, but I have been running my own git repository on a dedicated server for quite some time. I have never really been active at github or any other third party repository service. The reason I want to self manage my hosting is that I can get cheaper private repositories.
sqrt17大约 11 年前
For private repositories, I&#x27;ve discovered a software called SCM Server. It lets you add different users, with passwords, and create SVN&#x2F;Hg&#x2F;Git repositories with each their own access list.
zrail大约 11 年前
Sorry about the occasional 502s. I added a smattering of caching to the project pages so it should be better now.
评论 #7412567 未加载
rsgalloway大约 11 年前
heh, what at the odds: two libs that give you object-oriented access to git repos both coincidentally named the exact same thing:<p>python: github.com&#x2F;rsgalloway&#x2F;grit ruby: github.com&#x2F;mojombo&#x2F;grit