8 ms·
Maybe I'm too old, but are there people that really didn't know that any ssh access is sufficient for using git?
by thyristan 1y ago
Maybe I'm too old, but are there people that really didn't know that any ssh access is sufficient for using git?
- liveoneggs 1y agomost people think git = github
- halJordan 1y agoI always found these sort of categorical denigrations to be off base. If most people do think git = github then that's because they were taught it by somebody. A lot of somebodies for "most people". Likely by the same somebodies who also come to places like this. It has always taken a village to raise a child and that is just as true for an infant as a junior programmer. But instead we live in a sad world of "why didn't schools teach person x"
- bfkwlfkjf 1y ago[flagged]
- blueflow 1y agoHumans are fallible, relying on hearsay is unprofessional, learn your craft properly. Imagine what the equivalent argumentation for a lawyer or nurse would be. Those rules ought to apply for engineers, too.
- loloquwowndueo 1y agoDespite your indignation, the observation that most people think GitHub is git is entirely true. Do you point it out when you spot someone having that mistaken belief? I do.
- liveoneggs 1y agothey were taught by github
- Dylan16807 1y agoWhat makes you say that people complain about the spread of incorrect knowledge "instead" of teaching? Because there's nothing wrong with doing both.
- albert_e 1y agoIT support and cybersecurity teams responsible for blocking and enforcing network access restriction to "github.com" ... blocked a user request to install "git" locally citing the former policy. The organization in question does IT services, software development, and maintenance as their main business.
- jiggawatts 1y agoThat’s… special.
- watwut 1y agoSometimes I feel like IT and security people compete on how to make the work least possible. These guys won.
- bfkwlfkjf 1y agoNonsense... Even someone who knows that git isn't GitHub might not be aware that ssh is enough to use git remotely. That's actually the case for me! I'm a HUGE fan of git, I mildly dislike GitHub, and I never knew that ssh was enough to push to a remote repo. Like, how does it even work, I don't need a server? I suspect this is due to my poor understanding of ssh, not my poor understand of git.
- porridgeraisin 1y ago> I don't need a server? You do, an SSH server needs to be running on the remote if you want to ssh into it, using your ssh client - the `ssh` command on your laptop. It's just not a http server is all. You start that server using the `sshd` [systemd] service. On VPSs it's enabled by default. Git supports both http and ssh as the "transport method". So, you can use either. Browsers OTOH only support http.
- bfkwlfkjf 1y agoExactly! Only now the dots connected. Thank you!! Edit: hey this is really exciting. For a long time one of the reasons I've loved git (not GitHub) is the elegance of being a piece of software which is decentralized and actually works well. But I'd never actually used the decentralized aspect of it, I've always had a local repo and then defaulted to use GitHub, bitbucket or whatever instead, because I always thought I'd need to install some "git daemon" in order to achieve this and I couldn't be bothered. But now, this is so much more powerful. Linus Torvalds best programmer alive, change my mind.
- Dylan16807 1y agoAnd in general, any daemon that manipulates files can be replaced by ssh (or ftp) access and a local program. And most things are files.
- tsimionescu 1y agoBTW, a nice example of this general concept is Emacs' TRAMP mode. This is a mode where you can open and manipulate files (and other things) on remote systems simply by typing a remote path in Emacs. Emacs will then simply run ssh/scp to expose or modify the contents of those files, and of course to run any required commands, such as deleting a file.
- setopt 1y agoYup. I’ve heard several people say that Git is a product from Microsoft…
- devsda 1y agoI wouldn't mind it if those people are from non-tech background. Now, if it is a growing misconception among cs students or anyone doing software development or operations, that's a cause for concern.
- littlecranky67 1y agoThe irony, when you realize that Linus Torvalds created git.
- mrweasel 1y agoThere's an interview with Torvalds where he states that his daughter told him that in the computer lab at her college Linus is more known for Git than Linux Clip from the interview: https://www.youtube.com/shorts/0wLidyXzFk8 https://www.youtube.com/shorts/0wLidyXzFk8
- ruguo 1y agoLooks like they’re not developers after all
- brucehoult 1y agoOr just put the repo in a shared directory in a high-trust group of developers (or just yourself).
- ryandv 1y agoFilesystems and folders are foreign and elusive concepts to gen Z. https://www.theverge.com/22684730/students-file-folder-directory-structure-education-gen-z https://www.theverge.com/22684730/students-file-folder-direc...
- liveoneggs 1y agoI have encountered it in real life many times. These days I try to give jr's extra space to expose their gaps in things I previously assumed were baseline fundamentals - directories and files, tgz/zip files, etc
- andai 1y agoIt gets better than that... https://www.youtube.com/shorts/D1dv39-ekBM https://www.youtube.com/shorts/D1dv39-ekBM
- deleted 1y ago[deleted]
- Izkata 1y agoA tip, you can put the hash in a regular youtube URL to get the full interface instead of the limited shorts one: https://www.youtube.com/watch?v=D1dv39-ekBM https://www.youtube.com/watch?v=D1dv39-ekBM
- andai 1y agoThanks. You can also replace /shorts/ with /watch/ and get the same result. https://youtube.com/watch/D1dv39-ekBM https://youtube.com/watch/D1dv39-ekBM
- politelemon 1y agoAlso relatively unknown: You can clone from a directory. It won't accomplish the backup feature but it's another option/feature.
- deleted 1y ago[deleted]
- deleted 1y ago[deleted]
- superdisk 1y agoIf you do it over NFS or whatever then you can collaborate as well.
- mvanbaak 1y agogit over nfs ... not the very best idea.
- kragen 1y agoI haven't tried it, but I think it's fine if only one person has write access to any given clone. You can pull back and forth between clones freely. It's if you have two Git clients trying to write to the same repo that you'll have problems.
- kbolino 1y agoShared write access to the same git repo directory can be done sanely, but you have to get a number of things right (same group for all users, everything group writable, sticky bit on directories, set config core.sharedRepository=group): https://stackoverflow.com/a/29646155 https://stackoverflow.com/a/29646155
- kragen 1y agoYes, when you're not on NFS. Maybe it works on NFS but I wouldn't bet my project on it. Locking reliably on NFS is easy to get wrong, and it's a comparatively little-tested scenario now compared to 30 years ago. (You'll notice that the question doesn't even mention the possibility of NFS.) Fortunately at least with Git it's easy to have lots of backups.
- torben-friis 1y agoI 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 for a hotfix, but how does this beat pushing to the SOT, sshing into the server and pulling changes from there?
- skydhash 1y agoThere's a lot of configuration possible due to the fact that git is decentralized. I have a copy on my computer which is where I do work. Another on a vps for backup. Then one on the app server which only tracks the `prod` branch. The latter is actually bare, but there's a worktree for the app itself. The worktree is updated via a post-receive hook and I deploy change via a simple `git push server prod`
- torben-friis 1y agoYou actually led me into a dive to learn what worktrees are, how bare repos + worktrees behave differently from a regular clone and how a repo behaves when it’s at the receiving end of a push, so thanks for that! I’ve never worked with decentralized repos, patches and the like. I think it’s a good moment to grab a book and relearn git beyond shallow usage - and I suspect its interface is a bit too leaky to grok it without understanding the way it works under the hood.
- t_mahmood 1y agoMy way used to be in the past, put bare repos on Dropbox, clone the bare repo to a real path. Done. That way, I 1. didn't have to worry about sync conflicts. Once complete, just push to origin 2. had my code backed up outside my computer I can't exactly remember, if it saves space. I assumed it does, but not sure anymore. But I feel it was quite reliable. I gave that way up with GitHub. But thinking of migrating to `Codeberg` With `tailscale`, I feel we have so much options now, instead of putting our personal computer out on the Internet.
- crazygringo 1y agoThat doesn't work -- I've tried it. I mean, it works fine for a few days or weeks, but then it gets corrupted. Doesn't matter if you use Dropbox, Google Drive, OneDrive, whatever. It's apparently something to do with the many hundreds of file operations git does in a basic operation, and somehow none of the sync implementations can quite handle it all 100.0000% correctly. I'm personally mystified as to why not, but can attest from personal experience (as many people can) that it will get corrupted. I've heard theories that somehow the file operations get applied out of order somewhere in the pipeline.
- kragen 1y agoI've had a lot of success with using whatever. A lot of whatevers can quite handle many hundreds of file operations 100.0000% correctly.
- crazygringo 1y agoHa. I guess for me the other whatever is iCloud, but that corrupts too. But have you ever found a cloud sync tool that doesn't eventually corrupt with git? I'm not aware of one existing, and I've looked. Again, to be clear, I'm not talking about the occasional rsync, but rather an always-on tool that tries to sync changes as they happen.
- kragen 1y ago
- candiddevmike 1y agoWhat are some fun/creative ways to do GitHub/GitLab style CI/CD with this method? Some kind of entry point script on push that determines what to do next? How could you decide some kind of variables like what the push was for?
- deleted 1y ago[deleted]
- yule 1y agoI wrote about that idea here: https://www.stchris.net/tiny-ci-system.html https://www.stchris.net/tiny-ci-system.html
- skydhash 1y ago`man 5 githooks` is your friend. Hooks are just scripts and they can receive parameters. `post-receive` is most likely what you would want.
- CGamesPlay 1y agoCheck the docs for the post-receive hook, it does give everything you need. I don't know what you have in mind by "GitHub/Gitlab style", but it's just a shell script, and you can add in as much yaml as you want to feel good about it. I did a quick search for "post-receive hook ci" and found this one: https://gist.github.com/nonbeing/f3441c96d8577a734fa240039b7113db https://gist.github.com/nonbeing/f3441c96d8577a734fa240039b7...
- bluedino 1y agoConsidering git is one of those things barely anyone knows how to actually use, yes
- seba_dos1 1y agoMy theory is that git is just so easy to use without understanding it that you end up with lots of people using it without understanding it :)
- BoiledCabbage 1y agoIt's not "so easy to use without understanding it", it's the opposite it has so much unnecessary complexity (on top of a brilliant simple idea btw), that once people learn how to do what they need, they stop trying to learn any more from the pile of weirdness that is git. Decades from now, git will be looked back at in a similar but worse version of the way SQL often is -- a terrible interface over a wonderful idea.
- seba_dos1 1y agoI don't think that's true. In my experience it takes time, but once it clicks, it clicks. Sure, there is a bunch of weirdness in there as well, but that starts way further than where your typical git user stops. I don't think git would end up this popular if it didn't allow to be used in a basic way by just memorizing a few commands without having to understand its repository model (however simple) well.
- isodev 1y agoI imagine larger part of the developer community does not, in fact, know that GitHub is not git and one can get everything they need without feeding their code to Microsoft's AI empire. Just another "Embrace, extend, and extinguish"
- tuwtuwtuwtuw 1y agoI would be surprised if more than 10% of git users know that. Would be equally surprised if more than 20% of git users know how to use ssh. I think your age isn't the issue, but I suspect you're in a bubble.
- kleiba 1y agoThe non-Windows bubble?
- dtgriscom 1y agoI actually realized this last week, and have yet to try it. Programming for almost fifty years, using Git for thirteen years, and not an idiot (although there are those who would dispute this, including at times my spouse).
- __MatrixMan__ 1y agoI've been using git since 2007, this only dawned on me last year. Git is especially prone to the sort of confusion where all the experts you know use it in slightly different ways so the culture is to just wing it until you're your own unique kind of wizard who can't tie his shoes because he favors sandals anyhow.
- skydhash 1y agoThe Pro Git book is available online for free https://git-scm.com/book/en/v2 https://git-scm.com/book/en/v2
- kevmo314 1y agoThis sort of thing is part of the problem. If it takes reading such a long manual to understand how to properly use Git, it's no wonder everyone's workflow is different.
- PaulDavisThe1st 1y agoDo you know any construction folks?
- kragen 1y agoI don't see it as a problem that everyone's workflow is different, and, separately, I don't see it as a problem that it takes reading such a long manual to understand all the possibilities of Git. There is no royal road to geometry. Pro Git is a lot shorter than the textbook I learned calculus from. Unlike calculus, though, you can learn enough about Git to use it usefully in ten minutes. Maybe this sets people up for disappointment when they find out that afterwards their progress isn't that fast.
- __MatrixMan__ 1y agoAgreed. I'd read the manual if there was something I needed from it, but everything is working fine. Yeah I might've rsynced between some local folders once or twice when I could've used git, maybe that was an inelegant approach, but the marginal cost of that blunder was... about as much time I've spent in this thread so whatever.
- thwarted 1y agoYes. I've been subject to claims that a single person can't start a project unless and until an official, centralized repo is setup for them. I've responded with "git init is all that is necessary to get started", but they wouldn't hear it.
- fingerlocks 1y agoYou must work at Microsoft? A pound of paperwork for every new repo really shuts down experimental side projects. I showed my colleagues that we can share code via ssh or (painfully) one-drive anytime instead. They reacted like I was asking them to smoke crack behind the dumpsters. “That’s dangerous, gonna get in trouble, no way bro”
- mewpmewp2 1y agoIf you are working in a large corp and not your own side project, that honestly does sound like a bad idea.
- deleted 1y ago[deleted]
- fingerlocks 1y agoPlease, elaborate. I can share my screen with coworkers and talk about all sorts of confidential things, and I can even give them full remote access to control everything if I wished. So why would pushing a some plain text code directly to their machine be so fundamentally different than all the other means of passing bits between our machines?
- mewpmewp2 1y agoIf you share screen you are in control of what you show, if you give someone SSH access, what would stop them from passing/running a small script to fetch everything you have or doing w/e with your computer? I mean it's a blatant security violation to me. Just no reason to do that. In large corps you usually have policies to not leave your laptop unattended logged in, in the office, that would be potentially even worse than that.
- victorbjorklund 1y agoI never thought about it. If somebody had asked me, yeah. Of course it makes sense. But it's just one of those things where I haven't thought about possibility.
- mewpmewp2 1y agoDepends on what you mean by using etc. If somebody asked me if it's possible to scp my git repo over to another box and use it there or vice versa, I would have said, yes, that is possible. Although I would've felt uneasy doing that. If somebody asked me if git clone ssh:// ... would definitely work, I wouldn't have known out of the gate, although I would have thought it would be neat if it did and maybe it does. I may have thought that maybe there must be some sort of git server process running that would handle it, although it's plausible that it would be possible to just do a script that would handle it from the client side. And finally, I would've never thought really to necessarily try it out like that, since I've always been using Github, Bitbucket, etc. I have thought of those as permanent, while any boxes I have could be temporary, so not a place where I'd want to store something as important to be under source control.
- Klonoar 1y agoAm I misreading your comment? You’ve always used GitHub but never known it could work over ssh? Isn’t it the default method of cloning when you’re signed in and working on your own repository…?
- deleted 1y ago[deleted]
- mewpmewp2 1y agoI have used SSH for GitHub of course, but the thought that I could also use it from any random machine to machine never occurred to me. And when it might occur to me, I would have thought that maybe SSH is used as a mechanism for authentication, but it might still require some further specialized server due to some unknown protocols of mine. I always thought of SSH or HTTPS as means of authentication and talking to the git server rather than the thing that processes cloning. E.g. maybe the host would have to have something like apt install git-server installed there for it to work. Maybe it wouldn't be available by default. I do know however that all info required for git in general is available in the directory itself.
- 1y ago
- dogleash 1y agoThere's definitely generational loss about the capabilities of git. In the beginning, git was a new version control option for people to explore, now git is the thing you learn to collaborate on github/lab/ea. I remember the Chagon book coming out as the peak between dense technical explainers and paint by numbers how-tos.
- thaumasiotes 1y agoI was aware that it should be possible to interact directly with another repository on another machine (or, heck, in another directory on the same machine), which implies that ssh access is sufficient, but I was unaware of how that would be done.
- nmz 1y agoI don't think it has anything to do with being old, this is what happens when your software gets too complex that nobody even knows the very basics. This is highlighted with the documentation, if the software's documentation becomes lengthy enough that it could be an entire book, you're going to be getting these sorts of articles from time to time. Another highlight is bash, that is a huge man page for what should be a shell.
- paradox460 1y agoIn the past I've blown coworkers minds during github outages when I just pulled code from a co-worker's machine and kept working With remote, if your company stubbornly refuses to use a modern vpn like tailscale, and you can't really network between two computers easily, git format patch and git am, coupled with something like slack messages, works well enough, albeit moderately cumbersome
- tom_ 1y agoYep, me. I noticed that you sometimes use ssh:// URLs for GitHub, but I figured it was for authentication purposes only, and that once that step was over, some other thing came into play.
- djoanwnn 1y agoIt usually is. Normally you don't put a full shell behind ssh if you only expose git, but of cause you can
- al_borland 1y agoI read an article not long ago where students coming out of a web dev bootcamp were unable to make a hello world html file and open it in their browser. We’ve gone so far with elaborate environments and sets to make it easy to learn more advanced things, that many people never learn the very basics. I see this as a real problem.
- UK-Al05 1y agoWith cors this can be awkward now.
- al_borland 1y agoFor a simple hello world HTML file, cors should not enter the equation.
- delta2uk 1y agoI think if you're too young to know the earlier alternatives it's easy to overlook the distributed nature of git which made it different from them.