Right after updating from 2.12.0 to 2.13.0, I started seeing the following prompts on any hub
command:
โฏ hub compare $(git rev-parse --abbrev-ref HEAD)
github.com username:
I don't recall previously having to authenticate to use non-API functions of hub
, did something change?
This change was in 2.12.8 https://github.com/github/hub/commit/1282f19c71a84ac27b13019d9a3e53eb5265ba20. You are prompted because hub compare
wanted to be generally better at detecting the upstream branch, and for that it needs your GitHub username. This logic actually doesn't get executed in your case since you passed a git SHA explicitly, but your credentials would get used in case hub compare
was called without arguments. So we log you in preemptively.
I understand how this might have affected you, but I consider these non-breaking changes. _Most_ hub commands will need your GitHub credentials, and so it makes no sense to try using hub without authenticating. Furthermore, authentication is only ever done once per machine.
@mislav thank you for the detailed explanation! Surprised I hadn't already logged in on this machine :)
@nicksergeant No worries, thanks for bringing this up! It's really useful to know for me that people often aren't logged in for some commands and that changes to chose commands affect them.
Most helpful comment
This change was in 2.12.8 https://github.com/github/hub/commit/1282f19c71a84ac27b13019d9a3e53eb5265ba20. You are prompted because
hub compare
wanted to be generally better at detecting the upstream branch, and for that it needs your GitHub username. This logic actually doesn't get executed in your case since you passed a git SHA explicitly, but your credentials would get used in casehub compare
was called without arguments. So we log you in preemptively.I understand how this might have affected you, but I consider these non-breaking changes. _Most_ hub commands will need your GitHub credentials, and so it makes no sense to try using hub without authenticating. Furthermore, authentication is only ever done once per machine.