Catch up on stories from the past week (and beyond) at the Slashdot story archive

 



Forgot your password?
typodupeerror
×
Programming

Ask Slashdot: Self-Hosting Git Repositories? 165

mpol writes "We're all aware of PRISM and the NSA deals with software houses. Just today it was in the news that even Microsoft gives zero-day exploits to the NSA, who use them to prepare themselves, but also use the exploits to break into other systems. At my company we use Git with some private repositories. It's easy to draw the conclusion that git-hosting in the cloud, like Github or Bitbucket, will lead to sharing the sourcecode with the NSA. Self-hosting our Git repositories seems like a good and safe idea then. The question then becomes which software to use. It should be Open Source and under a Free License, that's for sure. Software like GitLab and GNU Savane seem good candidates. What other options are there, and how do they stack up against each other? What experience do people have with them?"
This discussion has been archived. No new comments can be posted.

Ask Slashdot: Self-Hosting Git Repositories?

Comments Filter:
  • http://gitlab.org/ [gitlab.org]

    • by Anonymous Coward

      I think my favorite thing about Gitlab has to be the description that reads:

      Self Hosted Git Management application. Create projects and repositories, manage access and do code review..

      then has a link to the source code and installation instructions [github.com], both of which are hosted on....Github

      • by Anonymous Coward

        Been using Gitlab at our company for about a year now. 0 down time. Tons of projects and repos on it.

    • Other Alternatives (Score:5, Informative)

      by paskie ( 539112 ) <pasky@u[ ]cz ['cw.' in gap]> on Friday June 14, 2013 @09:22PM (#44012843) Homepage

      You should clarify what are you after. Do you just need a place where to push + pull, or are you looking at something akin to the GitHub experience?

      Aside of GitLab, also consider Gitorious. I'm not sure about how easy it would be to get GNU Savannah up and running, and Git is only a small part of what it does.

      You can also find GitHub Enterprise interesting if you are ready to pay; I assume(!) it will call home to verify the licence though so making sure no stuff is sent to NSA may be tricky. ;-) Upside is minimal setup hassles for you.

      You may also find the Girocco platform interesting (CGIs for project index + project management web interface, and gitweb; much smaller than the above-mentioned ones so you have a good chance to actually review all the code for yourself, but it's also more raw experience; disclaimer: I'm the main author of Girocco).

      If you are fine with a simpler experience, you can simply use git-daemon (or purely SSH and git installed on the server), possibly gitolite to easily manage user access and gitweb/cgit for a web interface - there's no special magic, the Git repositories are just directories on the server.

      • Aside of GitLab, also consider Gitorious.

        Gitorious may be nice, but it's really painful to install. It has so many components. Until it is available directly from a distribution (like Debian, since I know there's some ongoing efforts for that...), then I'd advise to stay away from it.

      • by Anonymous Coward

        Wow, it's rare that someone actually has an informed answer to an Ask Slashdot post.

        We use SSH and Gitolite and it's very easy to setup and administer. No fancy Github-style web pages, though, just plain Git and whatever local interface you have installed.

    • I set gitlab up at home. It is very good, but a maintenance nightmare. No automated installation or updates, so i keep running on an old version.

      It would be a 3A solution if they offered a ppa with automatic updates

      • by eexaa ( 1252378 )

        To be honest, the updates aren't such a big deal. I was running and upgrading it through versions 2.x to 5.1 (or whatever is recent), and all updates went like:

        - git fetch
        - git checkout version-x.y
        - copypaste upgrade script commands from the web
        - service gitlab restart

        there has not been a single error in the upgrade process, ever.

    • by eexaa ( 1252378 )

      The single best thing about GitLab is the usage concept. The whole thing screams "Hey, use me, it will work correctly, look nicely and there will be a bonus feature!"

      We were using Redmine+gitolite for issues&code review&hosting before, and the programmers didn't really like to touch it very much because there was a plenty of form-filling for every issue/milestone, git integration was somehow weird, etc. I was surprised how migration to GitLab improved the way they document&fix stuff and help eac

  • by curunir ( 98273 ) * on Friday June 14, 2013 @07:58PM (#44012443) Homepage Journal

    You know it, you love it. Just continue using Github [github.com] (just on your own servers)

    • Github licenses its software precisely for this reason. (people who don't want to put their data in the cloud)

  • GitBlt (Score:4, Insightful)

    by stanlyb ( 1839382 ) on Friday June 14, 2013 @08:02PM (#44012463)
    Pretty good web interface. But in general, you dont need any special repository server, as GIT itself is the server, and client, etc. The only difference between dedicated server and a simple shared folder is the authentication, and the questionable convenience of having a web interface.
  • by Nutria ( 679911 ) on Friday June 14, 2013 @08:05PM (#44012475)

    It's easy to draw the conclusion that git-hosting in the cloud, like Github or Bitbucket, will lead to sharing the sourcecode

    Your "family jewels" live on someone else's machine, which is purposefully designed to let anyone on the Internet get access to it. So of course some Others* are going to get access to it even though you've password protected it.

    * And it doesn't even have to be PRISM, Echelon or the DOJ. Your competition, plain old script kiddies, Russian cyber-criminals, Chinese hackers and a host of others might break in.

  • by Tr3vin ( 1220548 ) on Friday June 14, 2013 @08:06PM (#44012483)
    I get why everybody is stocking up on tinfoil right now but based on what the NSA can supposedly do, hosting stuff internally isn't going to keep it away from them. After all, Microsoft is handing over all of the zero-day exploits and they are free to peruse the source to the Linux and BSD kernels.
    • by godrik ( 1287354 )

      well, you get to start somewhere, isn't it? Removing the data from machines you do not control to machine that you control is bound to make it harder for them. They could use zero-day exploits but they will need to put have some form of access to that particular machine. If the machine is properly firewall or configured it would still be difficult to access it.

    • Yeah, but good luck trying to find an exploit on the OpenBSD kernel to access my stuff.

    • by JanneM ( 7445 )

      A massive automated dragnet reiles on most data being very easy to access (whether technically or through bulk warrants). Add only moderate security to your data, and suddenly it won't be accessible in that way by default anymore. It has to be individually targeted in some manner, and that takes time and manpower that is always in short supply. So that won't happen unless there's a specific reason to target that data.

    • After all, Microsoft is handing over all of the zero-day exploits and they are free to peruse the source to the Linux and BSD kernels.

      We don't think they're attacking every system - we think they're attacking the high-value targets where the largest number of people are (Google, Facebook, etc.) They're storing away all that information for later prosecution [amazon.com] of political enemies.

      If they were in every system in the world, we'd know about it. Lots of paranoid people run IDS's, some even with one-way isolated

  • There is utterly nothing you can do to be sure you're not vulnerable to government snooping. The NSA could be subverting the very designs of the CPUs, NICs and etc that make up your computers at the hardware level. Even if they aren't doing that you have NO WAY to know that your OS is secure. You say "well, its open source, I can review the code, nobody can get a back door into Linux!" this is utterly nieve. What compiler was your kernel compiled with? Oh, you compiled it yourself! What compiler was your co

    • First of all, virtually any built-in exploit worth having would show up on someone's network analysis. Someone would flag it as unwanted behavior, at the very least. That already puts the implementor out on a limb.

      Second, the difference between getting zero-days fresh from MS and making them put backdoors in the OS or hardware is like the difference between getting your best friend's wife pregnant from a fling or locking her up in your basement as a slave.

      What's telling about responses like yours is that th

      • Re:BS fatalism (Score:5, Insightful)

        by Giant Electronic Bra ( 1229876 ) on Friday June 14, 2013 @09:42PM (#44012915)

        LOL, I'm not saying anyone HAS done anything. The point is, once you assume a certain level of paranoia the number of things to be paranoid about, and the number of them which are utterly beyond your ability to control grows almost without bound. Limit your objectives to those which make sense, and don't worry about the things that are beyond your control.

        You'd think that backdoors and such inserted by compilers etc would be found, but actually Ken Thompson successfully injected a backdoor into Unix early on via the PCC (Portable C Compiler) which allowed him access to ANY Unix system for a number of years. It spread to pretty much every system in existence and was never detected before he finally revealed its existence in order to demonstrate exactly my point. This was accomplished via a 'double code injection'. When PCC compiled itself it added a chunk of code that injected a backdoor during the compilation of the login program. Once the first generation of this back door existed the source was removed from PCC, but of course since PCC was self-hosting the ONLY way to compile it was with itself, and since the copy that was used for that HAD logically to be descended from the original binary the injection and the back door were virtually undetectable.

        Obviously not every such scheme would work and remain hidden for years, but it is demonstrably possible. Its certainly not too much to think that there are systems that DO contain back doors of some high degree of subtlety. For instance it would be MUCH easier for Windows to contain some for instance, and the NSA etc have almost certainly operatives who work for MS.

        Frankly, don't loose sleep over it. Software at some level simply cannot be truly secure.

        • Re: (Score:2, Interesting)

          by Anonymous Coward

          You'd think that backdoors and such inserted by compilers etc would be found, but actually Ken Thompson successfully injected a backdoor into Unix early on via the PCC (Portable C Compiler) which allowed him access to ANY Unix system for a number of years. It spread to pretty much every system in existence and was never detected before he finally revealed its existence in order to demonstrate exactly my point.

          According to Ken Thompson it was built but never distributed. http://skeptics.stackexchange.com/questions/6386/was-the-c-compiler-trojan-horse-written-by-ken-thompson-ever-distributed

        • Re: (Score:2, Informative)

          by Anonymous Coward

          I don't think Ken Thompson actually stuck a backdoor into Unix that propagated to other systems, but he described in a classic paper [wikipedia.org] one way how it could be done using a compiler.

          Not to add to the paranoia (if they were *that* interested they'd just break into your house, image your drives, and put everything back together again), some kind of backdoor almost got added [securityfocus.com] to the 2.6 Linux kernel [lwn.net]. The beauty of it was the appearance it was a simple coding error (assignment instead of comparison).

    • I would be surprised if the NSA could bridge bridge an air gap unless they get real close to your hardware.

      • by Anonymous Coward

        I would be surprised if the NSA could bridge bridge an air gap unless they get real close to your hardware.

        I would be surprised if you knew what TEMPEST shielding is, because NSA snooping vans have been parked outside of military installations picking up "wireless" video transmissions from unshielded computer equipment for literally decades now. And parked 30+ yards away too. Not exactly "real close".

        And since lead lining tends to make that 1-pound ultranothingbook weigh about 10 pounds when you're done shielding it, very few people are interested in truly protecting themselves from even the easiest of hacks.

        • Well, I don't think most of us need to be too worried about 'Tempest' (though actually you can buy the necessary equipment to make a Van Eck device). 'the eric conspiracy' has a point. If you want to restrict yourself to doing things offline, well you won't have to worry too much about NSA online spying... Of course it is a HARD thing to do these days, though still possible. In 20 years my guess is being 'off the grid' will be virtually impossible.

    • by Jeremi ( 14640 )

      There is utterly nothing you can do to be sure you're not vulnerable to government snooping.

      Well, there's always the air gap -- keep your git-hosting computer in a secret place, never connect it to any network or external hardware, and ideally never power it on either :^)

      OTOH, if your software is open-source anyway, it's hard to see why anyone would feel the need to hack the server to get to it.

    • by MtHuurne ( 602934 ) on Friday June 14, 2013 @10:32PM (#44013005) Homepage

      Obviously you need to be pretty paranoid to believe that the NSA has corrupted the GNU toolchain in such a way that it inserts back doors in every OS kernel it compiles, that the debugger has code inserted in it to not display said OS code, etc, but it is technically possible.

      If there was only one program that could display object files, it could be done. But any number of programs can display object files, including plain hex editors. If every single hex editor would have been compromised, we would have noticed by now. And a compiler that can detect "oh, this code is a hex editor, I'd better patch it to make it hide the nasty stuff when it's run" is way beyond what can currently be created, certainly not running fast enough on an ordinary PC to avoid detection.

      Besides, it's not the question of whether the NSA can access your files if they consider it their highest priority. The problem is that if there is an easy, low-cost way to access your files, an individual rogue agent might do it and hand your files to your competitor (a favor for a friend or for a little extra cash) without the rest of the NSA even knowing about it, or finding out only after the fact.

      • Obviously you need to be pretty paranoid to believe that the NSA has corrupted the GNU toolchain in such a way that it inserts back doors in every OS kernel it compiles, that the debugger has code inserted in it to not display said OS code, etc, but it is technically possible.

        If there was only one program that could display object files, it could be done. But any number of programs can display object files, including plain hex editors. If every single hex editor would have been compromised, we would have noticed by now. And a compiler that can detect "oh, this code is a hex editor, I'd better patch it to make it hide the nasty stuff when it's run" is way beyond what can currently be created, certainly not running fast enough on an ordinary PC to avoid detection.

        Well, just being a DA here. You would be able to tell there had been code added to your binary using a hex editor? Now, I AM pretty old school, I entered hex programs using thumbswitches on 70's era DEC hardware, and from magazines into my VIC-20, etc. and I've written plenty of assembly by hand, but IN GENERAL I'd be hard-pressed to see compiler/linker injected binary code in any application of the size that all apps are on modern PCs. Nor have I had the slightest reason or desire to hex edit a binary in g

  • Fossil (Score:2, Informative)

    by Anonymous Coward

    http://www.fossil-scm.org/

    The self-contained, stand-alone binary supports distributed version control, wiki, and bug reports. (The entire Fossil website linked above is simply a running copy of Fossil. When you clone a Fossil repository, you don't get just the source code, you get the whole website.) The same self-contained, stand-alone binary acts as the client, or as a standalone web server, or as a CGI program, or as a server run from inetd/xinetd.

  • From the article:

    Microsoft Corp. (MSFT), the world’s largest software company, provides intelligence agencies with information about bugs in its popular software before it publicly releases a fix, according to two people familiar with the process. That information can be used to protect government computers and to access the computers of terrorists or military foes.

    Given what intelligence agencies do with the information disclosed to them, how might a white hat ethically disclose vulnerabilities to MSFT?

  • Gitosis to manage the repositories, gitweb.cgi pointing to your repositories directory if you happen to want web-based read access. There's a nice guide on setting up Gitosis on the Git website [git-scm.com].
  • Do you think that hosting it private will stop them? only if you keep it on a closed network with no outside access and even then one of your employees are most likely a NSA agent and will still give them what they need.
  • by Anonymous Coward

    The NSA doesn't care about your shitty enterprise apps.

  • by willy_me ( 212994 ) on Friday June 14, 2013 @08:36PM (#44012631)

    Just host the GIT repository on a VM in the cloud. Look at TurnkeyLinux or Bitnami. Configure the VM to only accept encrypted connections and use an excrypted file system. One could still break into your VM if they wanted to - but it would be a lot of work and no government agency would bother investing the time and money to do so. If the NSA wants your source code you can bet they will get it - even if it's hosted locally.

    But the reality is you are being paranoid. The government does not care about your source code. They want to know who your friends are and when you communicate with them. If a rotten egg is found they want to be able to check for rot in neighboring eggs - because rotten eggs are generally connected.

    • If an encrypted file system is mounted, the key is somewhere in memory. If it's mounted in a VM and you have access to the host machine, you can easily create a snapshot of the VM's memory. I don't think it would be all that much work for a person familiar with the internals of the OS kernel in question to figure out where the key is stored in memory. Another thing they could do with a VM snapshot is patch the authentication functions, so any login is accepted. There are countless ways of gaining entry into

    • by gl4ss ( 559668 )

      even if the government isn't directly interested in the code, there could be people who then have that code and give it as a gift to their mistress who gives it as a gift to his brother working at a competitor..

  • by Burning1 ( 204959 ) on Friday June 14, 2013 @08:36PM (#44012635) Homepage

    If all you need is a place to dump your code, GIT is a perfectly functional GIT server. If you want full features, and damn the cost, you could consider GitHub enterprise.

  • At my company, we use Gitolite and I've only had good experiences with it.

    https://github.com/sitaramc/gitolite/wiki [github.com]

    • Darcs is lovely. But completely impractical.

      It's a real shame because it *almost* does version control right. But not quite.

      My main gripes:

      • Slow. Very very painful sometimes, minutes of processing for an operation on local disk slow...
      • Implicit dependencies make it virtually impossible to "cherry pick" - a feature which which is supposed to be one of the single biggest reasons for using Darcs, but which implicit dependencies make almost useless, "you can't have that patch without that other mass
  • Use gitweb.cgi

    Stick it in your cgi-bin directory and point it to your repos.

  • There they have small Debian/Ubuntu based distros that are designed to run one or a few related types of applications. I just started using their Redmine project management app for handling my software projects. Specifically I use it to track my documents, bugs, feature requests, and source code. The repository GUI front end makes it relatively easy to examine the code, especially when I have to put it up on a big screen for meetings. The distro has git, Mercurial, bazaar, and Subversion already installed a
  • Gerrit is a great tool that will host your git repositories, provide a robust access control framework, and give you excellent code review capabilities. It can connect to several types of auth back ends, and fits well in an enterprise. Gerrit is what Google uses for Android as well as for some internal projects. Several well known companies like Sony Mobile, Nokia, Qualcomm, Ericsson, ST, Garmin, Texas Instruments, and nVidia all use Gerrit and contribute back to the project as well.

  • So you want use open source software but you don't want to open source your own?

    • by DrVxD ( 184537 )

      You mean like GitHub?

      • Exactly the opposite of the question. He wants to host it privately.

        • by DrVxD ( 184537 )

          I wasn't replying to the question, I was replying to your comment:

          So you want use open source software but you don't want to open source your own?

          I was drawing attention to the fact that GitHub use open source software, but don't open source their own (although if you're wallet is fat enough, they'll license you a black-box appliance to run on your own hosts) - which is what you seem to be criticising the question for.

  • What the hell do you care if the NSA is looking at your source code?

    I mean seriously. Do you have pictures of you doing blow embedded in your source code or something?

  • You want to have open source, but you don't want the NSA to read your source?

    This sounds like a famous adage about eating cakes.

  • If the U.S. Government has the signing key to Windows Update, and can mess with upstream routers, it can put spyware on any Windows machine worldwide. No "exploit" needed.

    Somebody needs to start doing security analyses of everything that comes in via Windows Update. Comparing the updates that are sent to different computers is a good first step.

  • Local git repository hosting with a sexy web interface and bonjour discovery.

  • we use Gitlab for about 2 month now and it is great.
  • It's easy to draw the conclusion that git-hosting in the cloud, like Github or Bitbucket, will lead to sharing the sourcecode with the NSA.

    lol wut? No, that's not an easy conclusion. Github and Bitbucket are only going to share your sourcecode with the NSA if they receive a FISA (or similar) request for them. In which case you've drawn the attention of the NSA somehow and self-hosting isn't going to save your ass because they're just going to show up on your doorstep with the FISA request instead of Github's. And if you say "no" they'll just throw you in jail.

    And if you do take on the task of self-hosting, you now have to deal with security an

  • First: Why not consider opensourcing your software anyway? No need to hide then.
    Second: Your private Repos are safe. The NSA does not want you to know, they are reading them, so they will not leak your code to your competition, because then you will know, they can see it.

  • it depends on what you're concerned about. if you're concerned about server presence in general because you're developing software that you absolutely do not want the NSA to be able to either track or take down, then you don't want a server - at all. that's when you should consider funding gittorrent, which is a TRULY peer-to-peer distributed git system. git is "considered" to be "peer-to-peer" because it is possible to *manually* distribute the git repository. each git repository - a peer - is complete

  • by drolli ( 522659 )

    One of the worst summaries ever.

    1) If something is your privatly owned source code then you should always have a git repo of it on your hardrive and an encrypted backup of it in your friends/parents house or bank locker.

    2) Why are you shy of the NSA getting your source code? They can have mine. If i just write it for fun they wont mind. If i publish the program somewhere... there are decompilers and i am sure they know how to use these. The only reason for assuming that they dont have your source code woul

  • * gitosis https://wiki.archlinux.org/index.php/Gitosis [archlinux.org]

    Easy to setup, limited. Good to setup quick remote repositories with Ssh for user management.

    * gitolite https://wiki.archlinux.org/index.php/Gitolite [archlinux.org]

    Easy to setup, no web client. Good to setup quick remote repositories with more features then gitosis.

    * gitorious http://gitorious.org/gitorious/pages/Home [gitorious.org]
    * gitlab https://wiki.archlinux.org/index.php/Gitlab [archlinux.org]

    With web clients.

    * redmine http://www.redmine.org/ [redmine.org]

    My all time favourite project management web client

  • Gitlab, as others have mentioned, works a treat. There is a how-to on their site that walks you through everything needed. I had it up and running with LDAP integration in about half a day.

    Redmine, with the redmine-git-hosting plugin, also makes a very nice central git server. It was more of a headache for me to set up, because there is no step-by-step instructions for getting it working that I could find. It's very powerful, and has issue tracking, etc. which may be useful for you. There are many plug

Math is like love -- a simple idea but it can get complicated. -- R. Drabek

Working...