News for hackers. Stuff that matters.
Re:Gitea – Alternative to GitLab and GitHub by sago on Wednesday June 06, 2018 @04:50AM (#17245444)
Git is a distributed version control system. Every repo can be the master repo. 'Master' is purely a function of convention. It is worth stressing that you need no software to 'host' git. Every git repository is 'self hosting', by design.

Tools like this primarily provide a web client to a repository not intended as a working copy, with some optional non-git code collaboration tools, such as issues, and an inbox of pull requests (i.e. suggested patches). These are not unique tools, there are many options for issue tracking and email.

I make this point because these solutions are trying to replicate smaller or larger chunks of github rather than provide alternative ways to use git.

That said, Gita/Gogs is pretty. And might hold the hand of people only used to github. It is great that it is self-contained as a binary, so can be used with minimal configuration, like other front-ends.

But I worry that the emphasis on tools like this suggest we have accepted that github-flavoured centralised version control ('gitversion', maybe, or 'gcs'), rather than git, is now the de facto standard for version control. Am I paranoid? Does it even matter?

Re:Gitea – Alternative to GitLab and GitHub by tjoff on Wednesday June 06, 2018 @05:26AM (#17245584)
For the vast majority of use cases centralization is an essential feature. You want that single source of truth, then you can have tons of branches etc. outside but without that single source everything falls apart if you are a team of more than one person.

I'd argue that even a single developer really benefit from a "centralized" repository. It helps with maintainability, backups, syncing between machines (oh, my workstation wasn't on, can't update my laptop...).

Pulling code from random developers machines might sound pretty neat in isolation but that is the exception and an edge case to something else. And that something else should most likely be a centralized repository.

When people say they love decentralized version control I often get the impression that what they really love is local commits. There is nothing that says that you can't have local commits in a centralized version control system, it is just that being decentralized is a neat solution for many problems. But that is just an implementation detail that very few could care about, had it not been hyped to death.

Now this is something entirely different than the whole developer community putting everything in one basket (github), that's the only type of centralization worth worrying about.

Re:Gitea – Alternative to GitLab and GitHub by sago on Wednesday June 06, 2018 @05:52AM (#17245676)
> Pulling code from random developers machines might sound pretty neat

Isn't that just a straw man argument?

To the extent that it applies to distributed version control, it seems like an invented problem (i.e. I don't know anyone who uses a dvcs that pulls from 'random' developers). To the extent that it is true (we are all probably guilty of using code from developers we don't know and have not properly vetted) it seems like just as much---if not more of a problem---with github-esque projects.

> I often get the impression that what they really love is local commits

That's a really good point I have not considered before. So would you say that git's main contribution to the development community is showing the power of a VCS with local commits? And that's why github is dominating core git?

Re:Gitea – Alternative to GitLab and GitHub by LamaOfRuin on Wednesday June 06, 2018 @07:36AM (#17246132)
By random developer's machines they meant the actual machines. You can technically pull from another developer's (random or not, but anyone with the repo) actual laptop rather than going through an intermediary.

That was in fact one of the arguments a few true believers used in favor of DVCS when it was still a novelty.

The think I think truly gives developers comfort, in addition to all the nice features it makes simple, is LOCKSS (Lots of Copies Keeps Stuff Safe). When everyone has a full copy of the repo, even if you generally work through an intermediary, the central repo being blown away or taken control of by a bad actor doesn't mean you need to reconstruct the history of the code from whatever single snapshot checkouts individuals happen to have.

That said, I will agree that the workflows enabled, as well as the power of a common platform, are probably what really let git and github become the new default.

edit: Also I imagine being able to paw through the entire history and bisect entirely locally are vital features for a small (but essential especially of open source) minority of developers.

Re:Gitea – Alternative to GitLab and GitHub by mlthoughts2018 on Wednesday June 06, 2018 @07:35AM (#17246122)
I interpreted “random” in the parent comment to mean “ad hoc, but planned”. Meaning, not random, untrusted or unknown engineers, but engineers from an obvious trusted group (like my team), just accessed in an ad hoc manner.

The point being that short of choosing a convention for which person’s copy (or which machine, etc) counts as the primary source of record (which would then just be poor man’s centralization with the admin costs and maintenance of any centralization tools now a burden on the team rather than a third-party product), then interacting in an ad hoc way with even just my known team’s set of distributed clones of the project turns into a bookkeeping problem nobody wants.

I can also imagine a non-centralized model can lead to many more complicated workflow failure modes. I’m just thinking about how often novices get stuck with rebasing errors or squashing commits incorrectly, and bikeshedding arguments over whether it’s ok to ever revert master or if you should intentionally keep mistakes in the history and correct with new commits. I can imagine it being even worse when there are fewer conventions, since conventions are often the only way to avoid these bikeshedding debates about preferred git hygiene methods.

Re:Gitea – Alternative to GitLab and GitHub by giancarlostoro on Wednesday June 06, 2018 @05:40AM (#17245632)
Heck even torrents which are distributed needed a central server to connect through for ages. There's definitely a benefit to having a central server that aids the sea of clients / servers to communicate.
Re:Gitea – Alternative to GitLab and GitHub by k__ on Wednesday June 06, 2018 @05:51AM (#17245674)
Aren't torrents using DHT?
Re:Gitea – Alternative to GitLab and GitHub by tomsmeding on Wednesday June 06, 2018 @05:58AM (#17245719)
For which they need a number of central servers. These server do not do anything with the content, but they serve to announce to any new client what other clients are there, so that these new clients can start setting up their network. Once that's done, the new clients can discover the other nodes through the nodes they just connected to, and the servers have done their job.

But the servers are necessary, as far as I know, unless you want to enumerate IP addresses and scan for open ports. Which is going to be interesting with IPv6.

Re:Gitea – Alternative to GitLab and GitHub by ahauxuueei on Wednesday June 06, 2018 @06:18AM (#17245803)
You are mistaken. DHT is decentralized.

https://en.wikipedia.org/wiki/Distributed_hash_table

Re:Gitea – Alternative to GitLab and GitHub by vertex-four on Wednesday June 06, 2018 @06:37AM (#17245888)
The bootstrap problem isn’t generally solved though - a new client needs to know a set of other clients to connect to, same with a client that’s been turned off for a while and whose cached set of other clients aren’t online. This is solved by an always-on set of clients that these clients are statically configured with.

In theory, yes, if they go down, you could configure your client to point at another well-known client, though.

Re:Gitea – Alternative to GitLab and GitHub by k__ on Wednesday June 06, 2018 @05:52AM (#17245684)
AFAIK the Linux Kernel doesn't have a single source of truth.
Re:Gitea – Alternative to GitLab and GitHub by johannes1234321 on Wednesday June 06, 2018 @06:24AM (#17245832)
Yes it has - https://git.kernel.org/pub/scm/linux/kernel/git/torvalds/lin...

Of course some (many) people are using forks, but all sync directly or indirectly with this dude's version.

Re:Gitea – Alternative to GitLab and GitHub by ahauxuueei on Wednesday June 06, 2018 @06:22AM (#17245821)
You are mistaken.

Linux kernel dev branch single source of truth is https://git.kernel.org/pub/scm/linux/kernel/git/torvalds/lin...

The stable branches have their single source of truth repositories, too.

Re:Gitea – Alternative to GitLab and GitHub by falsedan on Wednesday June 06, 2018 @07:13AM (#17246038)
I think replying to "it doesn't have a single source of truth" with "actually there are multiple single sources of truth" kind of makes the OP's case for them.
Re:Gitea – Alternative to GitLab and GitHub by angelsl on Wednesday June 06, 2018 @07:27AM (#17246086)
What are you saying??

There is a single source of truth for a particular version of Linux.

Re:Gitea – Alternative to GitLab and GitHub by falsedan on Wednesday June 06, 2018 @07:50AM (#17246199)
I'm saying, you're wrong, and trying to wriggle out of being wrong by redefining the statement.
Re:Gitea – Alternative to GitLab and GitHub by projectramo on Wednesday June 06, 2018 @07:22AM (#17246065)
Before I read the other responses, I assumed it was just Linus’ personal repo
Re:Gitea – Alternative to GitLab and GitHub by k__ on Wednesday June 06, 2018 @08:15AM (#17246352)
Same here.

A few days ago I read about the multiple Linux distributions that all have their fork with special patches etc. pp.

Re:Gitea – Alternative to GitLab and GitHub by maconic on Wednesday June 06, 2018 @05:10AM (#17245514)
Independent of Gitea (which I have nothing to do with nor have any relationship with anyone involved). Your comment "It is worth stressing that you need no software to 'host' git. Every git repository is 'self hosting', by design." worries me. Yes, technically accurate, just as notepad, webstorm, atom, vi, emacs, etc. also don't need any 'host'. If you aren't working with multiple authors, a local laptop with git plus perhaps a USB flash drive for backup is all you need. But if you plan to actually have a project that multiple people will work on, it must be hosted whether it is technically required or not IMHO :) Let's say there is no Github or Gitlab type solution... how do you send me a pull request? How do I clone your git repo? In reality, there is always a hosted repo. If you want to open your firewall and share your public IP address so that you are the "hosted" solution that I push commits to or send pull requests to then fine :) But there is always a hosted solution if there are at least two people working on the same project... whether that's gmail.com hosting your emailed zip attachments, or you opening your firewall on your laptop so other people can connect to it, etc.
Re:Gitea – Alternative to GitLab and GitHub by adam-a on Wednesday June 06, 2018 @05:34AM (#17245616)
I took the comment as referring to hosting just a git repo on a public server. If you are working on a private project a simple option is to get a cheap VPS, give all your developers user accounts, and clone the repo into a shared folder. Everyone can pull and push with ssh and you can use Trello or whatever for issue tracking. Certainly that doesn't cover every use case, but it's worth being aware of the option and not feeling that you can't use git unless you pay github or spend a lot of time setting up a self-hosted clone of github.
Re:Gitea – Alternative to GitLab and GitHub by Qwertie on Wednesday June 06, 2018 @10:17AM (#17247309)
How is getting a VPS and running a git server, then setting up everyone's SSH key and accounts and then setting up accounts on trello and whatever other services you need (How are you doing CI in this setup) meant to be easier than dropping gitea on a server and having everything you need in one place and with a simple GUI.

Sure you CAN use git without a web UI, We had that at work for a while and it was not a good experience at all compared to using gitlab which we have now and we now have so many features that let us get things done faster.

Re:Gitea – Alternative to GitLab and GitHub by adrianN on Wednesday June 06, 2018 @05:17AM (#17245549)
Sending patches to mailing lists is a popular way of working that is well supported by git.
Re:Gitea – Alternative to GitLab and GitHub by tomsmeding on Wednesday June 06, 2018 @05:22AM (#17245569)
Playing the devil's advocate: then you still need somewhere that people can get the current repository state from. This place might not need to do anything with pull requests or any other write action on the repository, but somewhere to clone from is necessary. This would then be the "hosted" repo, and the patches sent via mail are just that, patches.
Re:Gitea – Alternative to GitLab and GitHub by pbhjpbhj on Wednesday June 06, 2018 @11:20AM (#17247839)
Sounds like you're talking around semantics. Yes, any server you connect to as a client to clone a repo is "hosting" that repo. But that can be practically any computer it doesn't need to be a _dedicated_ host in a server farm, it could be a devs laptop.
Re:Gitea – Alternative to GitLab and GitHub by maconic on Wednesday June 06, 2018 @05:28AM (#17245588)
Exactly :)
Re:Gitea – Alternative to GitLab and GitHub by maconic on Wednesday June 06, 2018 @05:20AM (#17245564)
Fair enough, but there is still a hosted solution, it's just hosted email instead :) I know Linux used that approach, which is seemingly ironic since Linus made git, and previously used BitKeeper. There seemed to be some problem that emailing patches to a mailing list wasn't solving to motivate the invention of git.
Re:Gitea – Alternative to GitLab and GitHub by dkersten on Wednesday June 06, 2018 @05:33AM (#17245613)
You can email git patches though (which is essentially what pull requests are, really, just using a different interface)
Re:Gitea – Alternative to GitLab and GitHub by ldehaan on Wednesday June 06, 2018 @07:36AM (#17246126)
you could use ngrok to expose yourself temporarily for distribution
Re:Gitea – Alternative to GitLab and GitHub by Boulth on Wednesday June 06, 2018 @05:48AM (#17245665)
I agree, additionally git has a built in server for sharing repos over the network.

What I'd personally like to see is a repo viewer similar to Github but implemented purely in JavaScript and cloning repos in the fly just like the native git does. Git.js (https://github.com/yonran/git.js) has something like that but it looks old and ugly.

Re:Gitea – Alternative to GitLab and GitHub by bshacklett on Wednesday June 06, 2018 @07:03AM (#17246008)
There are some real world problems with that: * Many networks limit access between wireless clients, preventing the connection between develop ER machines. * Host based firewalls often prevent services from listening on client machines. Getting security exceptions for this can be difficult to impossible in some organizations. * Discovery and initial remote config can be painful. While largely trivial from a technical perspective, this kind of thing can cause resistance from many end users.

I'm not arguing against your suggestion, but these are things that need to be solved if this workflow is ever going to see mainstream adoption. Network infrastructure and security has been geared towards centralization for a long time. That's going to need to change if we want to empower distributed applications of this nature (which I believe we do).

Re:Gitea – Alternative to GitLab and GitHub by Boulth on Wednesday June 06, 2018 @01:11PM (#17248950)
> I'm not arguing against your suggestion

Well, actually I wasn't suggesting that, just emphasizing git's distributed nature.

What I do suggest is a federated model, large number of small hosts akin to Mastodon. What would be the real issue is, like you noted, discovery. Centralized solutions have it nicely solved but it's hard to do in general with decentralized ones.

Re:Gitea – Alternative to GitLab and GitHub by hjek on Wednesday June 06, 2018 @06:13AM (#17245781)
What is this built in server git has? I thought sharing git repos over a network was depending on OpenSSH or similar.
Re:Gitea – Alternative to GitLab and GitHub by Foxboron on Wednesday June 06, 2018 @06:44AM (#17245911)
Re:Gitea – Alternative to GitLab and GitHub by falsedan on Wednesday June 06, 2018 @06:45AM (#17245914)
probably thinking about git-daemon (for git:// urls)
Re:Gitea – Alternative to GitLab and GitHub by Boulth on Wednesday June 06, 2018 @01:12PM (#17248962)
Yes, acutely git daemon can be used to serve via http(s) too.
Re:Gitea – Alternative to GitLab and GitHub by saltedmd5 on Wednesday June 06, 2018 @07:45AM (#17246177)
The power of DVCS is in that each developer who clones a repository has a fully-functioning local repository complete with history, which can be committed to freely and seamlessly merged into the upstream later.

As opposed to the traditional version control model where, e.g. every commit effectively requires a rebase against the remote and the history cannot be retrieved without a connection to the remote.

The "D" in "DVCS" is about having many copies of the repository, not about having _no_ central repository, which is still a core part of having an effective delivery workflow and very much encouraged by the baked-in concept of a default remote repository.

It's a distinction of technology, not of workflow.

This is really a common misunderstanding about what makes DVCS an effective concept.

Re:Gitea – Alternative to GitLab and GitHub by simias on Wednesday June 06, 2018 @06:12AM (#17245772)
The more I think about it the more I think Fossil[1] has the right approach by bundling bug tracking and wiki within the VCS. If git did the same thing (and the tools were usable) then nobody would worry about github "going bad" or anything like that. Changing your host would be as simple as changing your 'origin', anybody could replicate all the information easily. When I first heard about Fossil it sounded a bit like feature bloat but I think that was a bit of a kneejerk reaction.

In retrospect I think it makes complete sense to tie code, documentation and issues. They evolve together, maybe they ought to be versioned together.

[1] https://www.fossil-scm.org/

Re:Gitea – Alternative to GitLab and GitHub by falsedan on Wednesday June 06, 2018 @07:11AM (#17246030)
I feel like asking a poject manager to fiddle with some SCM system to get through grooming could be a bit unreasonable. I can't see how Fossil does ticketing to see if it's PM-friendly…

I feel like code reviews naturally should be stored alongside the code it's reviewing, and like the PoC shown by git-appraise from Google[0]

0: https://github.com/google/git-appraise

Re:Gitea – Alternative to GitLab and GitHub by sago on Wednesday June 06, 2018 @06:26AM (#17245840)
I've mused on this in relation to github's pages sitting on the gh-pages branch: a feature I like in the abstract, though I have problems with their implementation (it seems designed to increase lock-in rather than increase flexibility). I'm not sure the VCS needs to build in those tools, but having an established branching convention for associated data could allow many flowers to bloom.
Re:Gitea – Alternative to GitLab and GitHub by fergie on Wednesday June 06, 2018 @07:28AM (#17246089)
You’re not paranoid, and it does matter. Distributed systems definitely struggle to stay distributed. Git is a great example, as are most cryptocurrencies, which despite being distributed by design, generally come to rely on centralised wallets and trading platforms.

The web itself seems to be be becoming more centralised- more people spend more time on fewer websites. Websites are increasingly being hosted on a tiny number of mega cloud services, rather than millions of independent server rooms.

Centralisation is a real concern.

Re:Gitea – Alternative to GitLab and GitHub by joefreeman on Wednesday June 06, 2018 @05:16AM (#17245543)
Isn't 'origin' (not 'master') the convention you're referring to?
Re:Gitea – Alternative to GitLab and GitHub by tome on Wednesday June 06, 2018 @05:23AM (#17245574)
Both "origin" and "master" are conventions. They are promoted by the tooling that gives them a sort of default status.
Re:Gitea – Alternative to GitLab and GitHub by saltedmd5 on Wednesday June 06, 2018 @07:30AM (#17246097)
In the context of the original post, he is referring to origin (the convention for a default remote repository), not master (the convention for a default branch).
Re:Gitea – Alternative to GitLab and GitHub by ldehaan on Wednesday June 06, 2018 @07:37AM (#17246135)
use ngrok to share repos