I've used Git over SSH for several years for personal projects. It just works with no additional overhead or maintenance. Tip: create a `git` user on the server and set its shell to `git-shell`. E.g.: sudo useradd -m -g git -d /home/git -s /usr/bin/git-shell git You might also want to restrict its directory and command access in the sshd config for extra security. Then, when you need to create a new repository you ru…
You already have a Git server
81–90 of 454 posts
Re: You already have a Git server
#82I tried this and it is never as smooth as described. Why is GitHub popular? its not because people are "dumb" as others think. Its because GitHub "Just Works". You don't need obscure tribal knowledge like seba_dos1 suggests [0] or this comment https://news.ycombinator.com/item?id=45711294 The official Git documentation for example has its own documentation that I failed to get work. (it is vastly different from what…
> Its because GitHub "Just Works".
Git also "just works". GitHub simply offers a higher level of abstraction, a graphical UI, and some value-add features on top of Git. How much better all this really is arguable. I would say that it's disastrous that most developers rely on a centralized service to use a distributed version control system. Nevermind the fact that the service is the single largest repository of open source software, owned and controlled by a giant corporation which has historically been hostile to OSS.
GitHub "won" because it came around at the right time, had "Git" in its name—which has been a perpetual cause of confusion w.r.t. its relation with Git—, and boosted by the success of Git itself largely due to the cult of personality around Linus Torvalds. Not because Git was technically superior, or because GitHub "just works".
> You don't need obscure tribal knowledge
As others have said, a bare repository is certainly not "tribal knowledge". Not anymore than knowing how to use basic Git features.
> Like the adge goes, "Technology is best when it is invisible"
Eh, all technology is an abstraction layer built on top of other technology. Whether it's "invisible" or not depends on the user, and their comfort level. I would argue that all abstractions also make users "dumber" when it comes to using the layers they abstract. Which is why people who only rely on GitHub lose the ability, or never learn, to use Git properly.
Re: You already have a Git server
#83Re: You already have a Git server
#84I am surprised how little software engineers (even those that use) know about git.
Re: You already have a Git server
#85 git clone ssh://username@hostname/path/to/repo
this is equivalent to: git clone username@hostname:path/to/repo
and if your usernames match between local and remote: git clone hostname:path/to/repo
(if the path has no leading /, it is relative to your home directory on the remote)Re: You already have a Git server
#86Earlier quoted context omitted.
It's obvious that something non-obvious would have to happen with the workdir behind the user's back. Imagine that you are working with your workdir while someone else pushes something to your repo. Bailing out is the only sane option (unless something else has been explicitly requested by the user).
Nothing has to happen to the workdir if you fix HEAD.
Re: You already have a Git server
#87Re: You already have a Git server
#88Re: You already have a Git server
#89Maybe I'm too old, but are there people that really didn't know that any ssh access is sufficient for using git?
I didn’t know either - or rather, I had never stopped to consider what a server needs to do to expose a git repo. But more importantly, I’m not sure why I would want to deploy something by pushing changes to the server. In my mental model the repo contains the SOT, and whatever’s running on the server is ephemeral, so I don’t want to mix those two things. I guess it’s more comfortable than scp-ing individual files fo…
Re: You already have a Git server
#90Interesting. I am just trying to decide between self-hosting Forgejo and other options for hosting Git in own private network.