News for hackers. Stuff that matters.
Re:Git password authentication is shutting down by csmpltn on Friday August 13, 2021 @04:28AM (#28166735)
> "Such a simple idea required introducing the terminal, basic terminal commands, GitHub, git and its most common commands. It took about 3 hours for us to get through just the most basic pieces."

I don't get this.

"Can you imagine? Learning to program a computer took us some hours!"

What do you expect? That people without prior knowledge or experience just pick up source control in seconds? I'm honestly wondering - what makes you think source control systems are so trivial? Is it really too much to ask a newcomer to invest some hours into learning something these days?

Re:Git password authentication is shutting down by sullyj3 on Friday August 13, 2021 @04:53AM (#28166850)
> What do you expect? That people without prior knowledge or experience just pick up source control in seconds?

I mean, ideally, that'd be great. I don't think there's any fundamental reason things can't be this way, many of these complexities are completely incidental, rather than inherent.

> Is it really too much to ask a newcomer to invest some hours into learning something these days?

No, but when I'm learning something, I prefer for my time to be spent on important stuff, not wasted unnecessarily.

Re:Git password authentication is shutting down by moonchrome on Friday August 13, 2021 @06:14AM (#28167260)
I get the argument but I disagree. Git is meant for software developers on projects complex enough to warrant using SCM.

Using SCM for teaching development to newbies is already adding unnecessary complexity (even in a collaborative setting, flows are complex enough to distract from more fundamental topics).

If you're a software developer getting to the point where using git is needed you should absolutely know the core concepts behind public key cryptography, it's going to come up everywhere and you can fuck up big time by publishing the wrong part.

Re:Git password authentication is shutting down by kkirsche on Friday August 13, 2021 @06:27AM (#28167337)
It may be meant for software developers but has legitimate value in other domains. For example, DigitalOcean has their legal team use it as a way of providing diffs on their terms of service and other policies. This type of use case is where it benefits everyone, in my opinion, to reduce the friction to get started.

https://github.com/digitalocean/tos

There are plenty of text file versioning use cases I think, from configuration files for system administrators to LaTeX papers for science students who could benefit and should have an easy path to using it.

Re:Git password authentication is shutting down by moonchrome on Friday August 13, 2021 @06:32AM (#28167376)
I agree with this, I don't know if GitHub already does this with their desktop GUI.
Re:Git password authentication is shutting down by Certhas on Friday August 13, 2021 @07:10AM (#28167571)
This would be a reasonable point to make if there were reasonable alternatives for simpler version control. But for better or worse the world has standardized on git for all version control. If you want your "two phd student implement a new algorithm in a small python/julia package" to be found/used/talked about you need to be on github.

Heck even if you want to host a static site you probably want to just be on github these days.

Yet to me there is no reason for version control to be this complex. The current github + git universe is locked in, but I don't see why it should be optimal.

Re:Git password authentication is shutting down by dragonwriter on Friday August 13, 2021 @06:36AM (#28167396)
> Git is meant for software developers on projects complex enough to warrant using SCM.

There is no such thing as a project not complex enough to warrant a SCM/VCS. There's probably an argument that there is a case where a DVCS is unnecessary, but if you aren't actually doing distributed work there's no reason you need to be aware of more complexity in a DVCS than a non-D VCS.

Re:Git password authentication is shutting down by AnIdiotOnTheNet on Friday August 13, 2021 @08:05AM (#28167887)
> There is no such thing as a project not complex enough to warrant a SCM/VCS.

I have a program I wrote that helps me straighten scanned images in bulk. It took maybe an hour to write because I did it in D and was not familiar with the language. Though I have used it for years now and made a few tweaks I have never felt the need to have it in any kind of source control.

Re:Git password authentication is shutting down by hnbad on Friday August 13, 2021 @07:37AM (#28167732)
> Git is meant for software developers on projects complex enough to warrant using SCM.

I and most developers I know use git or similar for projects of any size, often even if it's "just" a single file or a "one-off" change (because it rarely stays that way).

I would have agreed in the days when Subversion was the closest you could get to "easy version control" but these days in my eyes "the point where using git is needed" is not far from the point where you start making changes to an existing file.

Re:Git password authentication is shutting down by AnIdiotOnTheNet on Friday August 13, 2021 @08:07AM (#28167903)
I think this way overestimates the value of both Git and source control in general for a lot of projects. Is this the result of the now common development methodology of using as many dependencies as possible or something?
Re:Git password authentication is shutting down by zem on Friday August 13, 2021 @06:08PM (#28175239)
no, it's often finding out the hard way that you have made a mess and it would be really nice to get back to the working state of an hour ago
Re:Git password authentication is shutting down by AnIdiotOnTheNet on Tuesday August 17, 2021 @08:08AM (#28208991)
It isn't that hard to just make a backup before you do anything messy. That's sorta what I'm getting at: people are using git as a really overcomplicated backup solution. It has the same problem: you forget to commit before making changes and you're still hosed.
Re:Git password authentication is shutting down by hnbad on Tuesday August 17, 2021 @12:40PM (#28211862)
Okay, but if you need to do "a backup" more than once, you will inevitably come up with your own shoddy versioning system, even if it consists of littering your project with files named "Copy of 2017-04-20_main_v1 (17).bak.new.old.bad.cpp~".

The alternative is just doing what you always do on every project: run "git init" and occasionally do a "git add -i && git commit". Even if you end up with a lot of non-descriptive snapshots name "WIP" at least you have something resembling a chronology and you can track changes across multiple files at the same time.

If your hobby projects mostly consist of single files with thousands of lines that are easy to unambiguously make copies of for backups, I won't judge you, but your experience is definitely not universal.

Re:Git password authentication is shutting down by AnIdiotOnTheNet on Thursday August 19, 2021 @10:13AM (#28234067)
> The alternative is just doing what you always do on every project: run "git init" and occasionally do a "git add -i && git commit".

Or I just let my backup software handle it. Automated daily backup supplemented with manually initiated backup if I need a specific point-in-time snapshot.

This isn't rocket science.

Re:Git password authentication is shutting down by ajtjp on Friday August 13, 2021 @10:46AM (#28169535)
Part of the problem is we were all newbies at some point.

I remember the first time I tried to use SCM. It was a collaborative project in college, and our professor recommended we set up a CVS repo (at that point in time, he probably should have recommended SVN, but we didn't know that). We spent about an hour trying to set one up, and eventually concluded it was a waste of time and that we'd just e-mail each other .tar.gz files of the repo and manually sync them. Eventually we did break something and have to go back to the last .tar.gz to un-break it, which wasted another hour or so, but with the friction we'd seen trying to set up CVS, that still seemed preferable to trying SCM again (although it also showed that SCM would have been helpful had we been able to set it up).

GitHub with a password is much easier than setting up a CVS repo as a newbie, and had that been an option then we likely would have succeeded. But I'm much more doubtful that we would have tried and succeeded at token authentication; I also remember how mystifying I found it the first few times I worked somewhere that required it, even understanding the underlying concepts of public key cryptography. The problem is understanding the tools well enough to get it working, and working across operating systems (Linux doesn't have PuTTY; Windows doesn't have the Linux command-line tools; etc.).

When I eventually started using SCM reliably, it was with Mercurial + BitBucket + a password. I recall that I kind of knew I should set up a token, but my first few attempts were unsuccessful (largely due to most instructions being Linux-focused, and being on Windows), and thus I kept using a password for years because making progress on development seemed more useful than figuring out a token. I did use randomly-generated, lengthy, unique passwords, so the risk of using a password seemed pretty low.

So I think this is a bad thing for newcomer-friendliness. Perhaps it is an opportunity for GitLab and whatever other competitors still exist. But I would have rather seen it remain an option, perhaps based on new users choosing whether they're new to Git (allow passwords) or experienced (require tokens, but be able to change it in case they're only experienced with Git, and not with tokens).

Re:Git password authentication is shutting down by sullyj3 on Friday August 13, 2021 @06:48AM (#28167438)
Understanding the fundamentals of public key cryptography is a worthy pursuit. Memorizing the idiosyncratic flags of yet another command line tool (or looking them up in the man page every damn time like most people do), instead of having an interface that doesn't require you to relearn it every time you use it, isn't.
Re:Git password authentication is shutting down by benhurmarcel on Friday August 13, 2021 @05:55PM (#28175058)
Most of the times I use git, I don’t actually need version control, I just want to put my files on Github.
Re:Git password authentication is shutting down by lucideer on Friday August 13, 2021 @05:37AM (#28167070)
> "Can you imagine? Learning to program a computer took us some hours!"

I wouldn't call installing a vcs "learning to program".

A better analogy might be: "Can you imagine, opening an A4 notepad to take lecture notes took us some hours"

Not a perfect analogy I know but "setting up tools to start learning" != "learning completely"

Either way, I don't really get this kind of aggressive resistance to making things more accessible...

Re:Git password authentication is shutting down by hnbad on Friday August 13, 2021 @07:40AM (#28167748)
For contrast, Microsoft Word and similar tools have a built-in permanent edit history. Using them requires no more than knowing what menu to find it in. As far as I know it doesn't do branching but for the baseline MVP of "I need to know what this file looked like before we made these changes" it solves the problem with significantly less than "some hours" of training.
Re:Git password authentication is shutting down by jonathanlydall on Friday August 13, 2021 @07:14AM (#28167597)
> A better analogy might be: "Can you imagine, opening an A4 notepad to take lecture notes took us some hours"

And using a notepad to take notes relies on your having learnt how to read and write in general, which took a significant amount of time.

That being said, I agree with it being good to try make things as accessible as possible, so long as it doesn't impact overall utility.

Re:Git password authentication is shutting down by yunohn on Friday August 13, 2021 @04:34AM (#28166770)
> what makes you think source control systems are so trivial?

The commenter is referring to the tooling around git, wasting valuable teaching time.

For example, most people will only ever have one ssh key on their device. Having to setup the keyring, and keeping aware of its nuances, is a waste of time.

Re:Git password authentication is shutting down by taotau on Friday August 13, 2021 @07:23AM (#28167647)
Curious, in these three hours did you teach your student about git log, checkout $HASH, bisect, revert or any of the other ways that git is actually useful beyond being a glorified FTP ?

Git is a wonderfull tool for exploring a development process unlike anything that’s existed in other domains, but in my experience it is mostly used as a write only tool to deploy code.

Re:Git password authentication is shutting down by hiimshort on Friday August 13, 2021 @08:59AM (#28168300)
Since this was the first session on the topic, we only learned about add, commit, push and had a quick glance at remotes. The goal here is to ease into the normal flow of weite code, commit, push and then follow up with some of the more intricate pieces of git.

It's really important to me that whoever I'm teaching is able to really understand each piece and build their intuition as we build things up.

FTP is a bit orthogonal to the use case here. That being to have her code pushed up to a central repository, able to clone it on her other computer (laptop), and enable me to review it or tweak things.

Re:Git password authentication is shutting down by moss2 on Friday August 13, 2021 @04:34AM (#28166772)
You're right. A subject being difficult to master means we should do everything we can to make it difficult to learn too.
Re:Git password authentication is shutting down by csmpltn on Friday August 13, 2021 @05:52AM (#28167155)
> "You're right. A subject being difficult to master means we should do everything we can to make it difficult to learn too."

Never before have humans experienced such an overabundance of learning materials (YouTube, blog posts, StackOverflow, books, courses, etc). So much of it easily accessible and available for free. The tooling continually improves.

What most people are missing these days is a goddamned attention span and a dash of humility.

This isn't about mastering source control systems (that can take years). This is about taking a complete newcomer with absolutely no background whatsoever from nothing to something in three hours, which is an absolute miracle in and of itself. Will you also complain about how hard it is to learn how to swim, paint, use chopsticks, change a tire or play chess?

Re:Git password authentication is shutting down by johannes1234321 on Friday August 13, 2021 @07:52AM (#28167815)
> Never before have humans experienced such an overabundance of learning materials (YouTube, blog posts, StackOverflow, books, courses, etc). So much of it easily accessible and available for free.

Quantity unfortunately doesn't mean quality.

Without experience it is hard to separate low quality from high quality content. And then there's are.many things which are outdated ...

Re:Git password authentication is shutting down by benibela on Friday August 13, 2021 @04:57AM (#28166873)
When I learned programming 20 years ago, it went like this

Start QBASIC

Enter:

PRINT "Hello World!"

Run the program.

Congratulations, you wrote your first program and have become a software developer

Re:Git password authentication is shutting down by chriswarbo on Friday August 13, 2021 @06:50AM (#28167449)
Right click -> Inspect, Console, 'alert("Hello World!")'
Re:Git password authentication is shutting down by 10000truths on Friday August 13, 2021 @05:02AM (#28166887)
Uh... you can still do that today.

    python3
    > print(“Hello world”)
Re:Git password authentication is shutting down by nemetroid on Friday August 13, 2021 @05:43AM (#28167100)

  >>> print(“Hello world”)
    File "<stdin>", line 1
      print(“Hello world”)
            ^
  SyntaxError: invalid character '“' (U+201C)
Re:Git password authentication is shutting down by 10000truths on Sunday August 15, 2021 @01:46PM (#28190692)
You can blame my iPhone for trying to "helpfully" convert my quotes into smart quotes. :(
Re:Git password authentication is shutting down by bspammer on Friday August 13, 2021 @05:40AM (#28167082)
You’re missing the “install python” step.

Oh and probably you should be using a package manager to do it so figure out which one’s on your system first and learn its interface.

Oh and it’s best practice to create projects in a virtualenv so install that too, and learn how to use it.

Re:Git password authentication is shutting down by maple3142 on Friday August 13, 2021 @06:02AM (#28167205)
The is also a JavaScript programming environment that almost every PC has, the browser. Just open any page and press F12, click the "Console" tab and type `console.log("Hello World")` and you just write your first Hello World.
Re:Git password authentication is shutting down by ovi256 on Friday August 13, 2021 @05:04AM (#28166899)
You can still do that today!

Start ipython (or the interactive interpreter for your language)

Enter:

print("Hello World!") See the result!

Re:Git password authentication is shutting down by blowski on Friday August 13, 2021 @05:09AM (#28166929)
Does it still take hours if you're using a client, like GitHub Desktop, SourceTree, or something like that?
Re:Git password authentication is shutting down by formerly_proven on Friday August 13, 2021 @05:12AM (#28166943)
No, but doing so results in learned helplessness. "Whoopsie, a fucky wucky happened and the GUI I use for git made a big mess. I'm going to delete my repo and clone it again."
Re:Git password authentication is shutting down by dagw on Friday August 13, 2021 @05:16AM (#28166960)
Why do you think using a GUI will make it more likely to fuck up your repo than a using the CLI? Most git GUIs are actually better at warning you that you might be about to do something stupid and making the consequences of you actions more visually clear.
Re:Git password authentication is shutting down by formerly_proven on Friday August 13, 2021 @05:49AM (#28167141)
I don't think it does. I've observed it many times. The GUIs don't understand git, have shitty defaults, resulting in unnecessary conflicts and histories which are essentially unreadable (Merge branch 'master' of ... x1000). If any error pops up, it is not read (not their fault - NOBODY reads error message boxes, everyone selects the default action within a fraction of a second), if there is a conflict, they usually cannot resolve it with the GUI, or if they do their changes are lost by accident half the time. So in practice when conflicts happen the changes are copied out, the repository deleted and cloned again (because aborting the merge or resetting the branch is unknown / unsupported by the GUI / too difficult or hidden), changes are pasted back in and committed. SUCCESS!

When you use git directly, you at least get all the tools to solve your problems. When you use (most) frontends, you don't. And you learn: If there are errors, just start over - much easier!

This is not the fault of developers, it's shitty tooling + bad tutorials + bad defaults in tooling + unsuitable defaults in git (git's defaults are for the workflow used in the kernel, NOT the workflow most git users use, which is completely different; it's actually amazing that the same tool can support both workflows pretty well, with the right config settings).

Re:Git password authentication is shutting down by jonathanlydall on Friday August 13, 2021 @07:45AM (#28167775)
In general I agree with you that Git GUI clients aren't great, but there is at least one exception.

On Windows I use TortoiseGit and although I find certain things to require a few more clicks than I would like, it has been able to handle very nearly everything I have ever needed to do with Git. Management of worktrees seems to be the only thing I wish it would add, but once you add a worktree folder using the command line, it is then able to work with it perfectly fine.

It even recently added dark mode!

Every other Git GUI I've tried only seems to cover "pull", "merge" and "push" workflows competently, at best. If you want to do anything more complex like even a slightly interesting rebase, then they seem to be a nightmare. So I completely agree with your assessment there.

I don't really know Git CLI very well and the thought of using it exclusively seems very inefficient and painful. As with any decent GUI program, TortoiseGit exposes available functionality reasonably well and you don't have to resort to reading a large manual to become proficient.

For both Linux and Mac (which I use rarely to work on issues with a cross-platform Electron app), I have yet to find a Git GUI app that I am satisfied with.

When I looked, Fork appears to be pretty good, I should probably at least try the evaluation and if it's okay just pay the seemingly reasonable $50 fee, but it's a pity it doesn't also support Linux.

I know GitKraken works on Linux, but it's one of those clients which is not nearly powerful enough for my needs and it costs $60 a year, I think GitKraken's popularity is largely driven by their eye-candy and that many Git users don't really understand Git beyond the simple workflows.

Re:Git password authentication is shutting down by blowski on Friday August 13, 2021 @07:26AM (#28167662)
This is the same debate as whenever some abstraction layer hides details - high-level vs low-level code, automatic vs manual in a car, coffee pods vs brewing machines, hand-tools vs power-tools, ready-made sauces vs make-from-scratch.

As a novice, you don't understand the benefit provided by the tools, so you don't bother learning them. As an expert, you've forgotten the shape and impact of the massive learning curve faced by the novice so you don't understand why they don't bother overcoming it.

I suspect the 80/20 rule applies here - a GUI provides 80% of the value of a source control system, 80% of the time. If occasionally you do have to delete everything and start again, that may actually be a more effective technique than spending a lot of time learning Git beforehand, despite how crazy it looks from the perspective of an expert.

Re:Git password authentication is shutting down by blowski on Friday August 13, 2021 @05:44AM (#28167107)
So we've got the best of both worlds here. If you want to go quickly, use a GUI client, but accept you may run into problems down the road. If you want to be able to leverage more power, you'll need to spend a lot more time developing expertise with the tools.

Either way, GitHub's authentication change doesn't seem to be the problem people are making it out to be.

Re:Git password authentication is shutting down by trophycase on Friday August 13, 2021 @05:29AM (#28167024)
Most people want to just code, not putz around for hours wrestling with dev environments and tooling.
Re:Git password authentication is shutting down by TanteTara on Friday August 13, 2021 @05:57AM (#28167173)
Are those the same people that will add security, maintainability, performance and logging "later"?
Re:Git password authentication is shutting down by batty_alex on Friday August 13, 2021 @07:13AM (#28167588)
Well, management did say it would be okay to leave it for after the new feature release…
Re:Git password authentication is shutting down by caslon on Friday August 13, 2021 @04:33AM (#28166768)
...they are so trivial that they can be figured out in less than three hours. Mercurial can be learned in minutes. Fossil in half an hour. Even git isn't particularly difficult; you can get "working knowledge" of it by glancing at this:

https://git-send-email.io

Re:Git password authentication is shutting down by Clewza313 on Friday August 13, 2021 @04:53AM (#28166848)
You can learn Mercurial in three minutes if you have a background in command line administration and source control. But in a past life I have on several occasions found myself trying to train enterprises on how to use basic source control (as opposed to, say, SSHing into production systems manually and cp config.xml config.xml.bak), and failing to get the message through.