Live data from Hacker News

Git password authentication is shutting down

github.blog

311–320 of 353 posts

Re: Git password authentication is shutting down

#311
post #301

Earlier quoted context omitted.

> "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 -…

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.

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

#312
post #284

I'm fine with this change for my usage, I don't think I've used password auth for myself or any automated service I've setup for years now. However, this will introduce more confusion for newcomers who already have to figure out what Git, GitHub, etc are. I just spent some time last weeekend teaching someone the basics of how to create a new project. Such a simple idea required introducing the terminal, basic termina…

Why do we need a more gentle learning curve? Let them figure it out as everyone else did. There's more than enough information online.

Development doesn't have tk be hard or confusing. A large amount of the complexity that is introduced is wholly unnecessary. Why wouldn't we want to make it easier for people to learn things?

Re: Git password authentication is shutting down

#313

Anyone else notice that GitHub recently removed the sample code for cloning with SSH?

I deleted my github account when M$ took over so I can't check. You're logged, you have declared a SSH key but they still don't provide the small code line to clone using SSH?

That's a good question. It seems to only happen if I'm not logged in. It could very well be because it doesn't know if I have an SSH key. Not that it really matters for a public repo.

Re: Git password authentication is shutting down

#314

Earlier quoted context omitted.

> 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 so…

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 c…

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

#315
post #55

Earlier quoted context omitted.

GCM still doesn't support multiple users properly, though. Https auth is what I was using for a second GitHub account, so I'm not thrilled about this change. I want to have work and personal GitHub accounts on the same machine and very explicitly choose which account goes to which repo. Too often I have changes going in with the wrong user.name / user.email or account to the point where I paranoidly reauthenticate ev…

We recently added support for multiple identities but it's not complete (or seemingly documented, oops). I'll take a note to look into fixing and extending it. Edit: but also, GCM Core has nothing to do with the user.email/user.name in .gitconfig. I have a similar problem where I want some commits written with my work email and others with my personal, and I always forget to check it when starting in a new repo. I pu…

Don't know if you'll see this now that it's been a few hours, but for anyone trying to work with multiple distinct GitHub identities: GCM Core will read the user part of a URL and use it if provided. There's an "ambient" or "default" user for URLs which don't include a user part, which is the only thing most people use. If I wanted to be really specific to use my `vtbassmatt` identity, I'd write:

    git clone https://vtbassmatt@github.com/WorkOrg/work-repo.git
I manually added the "vtbassmatt@" to tell Git to tell GCM Core that that's who I want to log in as.

(Here's where I could tell you about all the ways in which the credential manager system in Git is deficient... I'll spare you, though, and simply say that this is close to the best we can do without a whole other layer of artifice that you probably wouldn't like.)

Re: Git password authentication is shutting down

#316

What's the recommended way to manage git clones on shared computers now? In the past, multiple people would use these computers, and would push and pull using their own github credentials. I'm talking lab computers in a research context, where there is a shared login to the computer, but where we use our own github credentials to access a shared repo we all have commit rights to. Now what are we supposed to do? I don…

Not necessarily recommended, but something that was done by a real team at a real company.

We all had our own GitHub Enterprise accounts. But only one was logged on to each computer. Rather than switch out the accounts when someone else used a computer, we just included the initials of whoever was making the commit in the message. E.g. DU: Fix some bug, if Double Unplussed was making the commit.

This only really worked because no one was using a GitHub login that they also used for personal projects - only the corporate ones were connected. And it made the GitHub statistics on who was contributing what completely useless. But it did mean that we could rotate among the shared computers and push easily, and if you did need to ask someone for help when investigating a bug, you could still see who made the changes via git blame - just by looking at the message instead of who Git thought had pushed it.

Might not work for your use case, and I'm sure some readers will be horrified, but it worked well enough for us, in an XKCD 1172 (https://xkcd.com/1172/) style manner.

Re: Git password authentication is shutting down

#317
post #55

Disclosure: I'm the Git Systems PM at GitHub. Opinions are my own and I wasn't directly involved with this effort. GCM Core is a really straightforward way to auth with GitHub and several other Git hosts. It comes with Git for Windows by default, can be installed with `brew` on macOS, and from a .deb on Linux. https://github.com/microsoft/Git-Credential-Manager-Core (it started under the Microsoft banner but is maint…

GCM still doesn't support multiple users properly, though. Https auth is what I was using for a second GitHub account, so I'm not thrilled about this change. I want to have work and personal GitHub accounts on the same machine and very explicitly choose which account goes to which repo. Too often I have changes going in with the wrong user.name / user.email or account to the point where I paranoidly reauthenticate ev…

GCM Core does support multiple users with GitHub remotes. You have to put the username in the remote URL, for example:

https://alice@github.com/owner/repo

GCM will store credentials for "alice" only. Repositories that have remote URLs with a different "user@" will use different credentials.

Remote URLs without a "user@" part at all (like "https://github.com/owner/repo") are treated like the "default" user for GitHub.com, rather than a specific one.

Re: Git password authentication is shutting down

#318
Oh great. More security theater.

This should be a per repository setting. Not system wide! If someone has a "threat model" where "passwords are bad" then fine. Force users interacting with that particular repository to deal with this security theater of making tokens which have the same power as the account that authorized them. I guess they have better granularity, but in practice anything more complicated that Unix permissions is a total disaster and just leads to people not understanding what the different levels actually mean.

It shouldn't be imposed top-down on every user.

Re: Git password authentication is shutting down

#320

I'm fine with this change for my usage, I don't think I've used password auth for myself or any automated service I've setup for years now. However, this will introduce more confusion for newcomers who already have to figure out what Git, GitHub, etc are. I just spent some time last weeekend teaching someone the basics of how to create a new project. Such a simple idea required introducing the terminal, basic termina…

I don't think newcomers use this anyway; usually you start off setting up git with ssh key-based authentication, not password-based.

That's exactly why git is a bit of a pain to initially set up.

Post reply on HN