As part of offering GHE compatibility #273, we need to make some UI decisions on how to onboard users, i.e. authenticate them against their instance and detect when a local repository is a clone from a GHE host as opposed to from github.com.
-
When in the context of a git repository, we might detect that the main git remote does not point to a github.com host, but to example.org, for example.
- How should we assume if
example.org is a GHE host that we should try authenticating against?
- How should the authentication flow look like? E.g.
Press Enter to open https://example.org/authorize in your browser
- If there are several git remotes of which some point to
github.com and others to a GHE host, which one should we default to?
-
When not in the context of a git repository, how should users instruct commands such as repo create, repo clone owner/repo, repo fork owner/repo, and commands such as issue view 123 -R owner/repo to operate on their GHE instance instead of github.com?
- In hub, users may set
GITHUB_HOST=example.org in their environment before invoking a hub command, and that solution is fine for programmatic use, but not ideal for casual use.
- Also in hub, whenever a user has previously authenticated against their GHE host, commands like
hub clone repo prompt with Select host: and github.com, example.org as options. This works, but I find the interactive prompt sometimes tiresome considering I'm cloning from github.com 99% of the time.
/cc @ampinsk @billygriffin
As part of offering GHE compatibility #273, we need to make some UI decisions on how to onboard users, i.e. authenticate them against their instance and detect when a local repository is a clone from a GHE host as opposed to from
github.com.When in the context of a git repository, we might detect that the main git remote does not point to a
github.comhost, but toexample.org, for example.example.orgis a GHE host that we should try authenticating against?Press Enter to open https://example.org/authorize in your browsergithub.comand others to a GHE host, which one should we default to?When not in the context of a git repository, how should users instruct commands such as
repo create,repo clone owner/repo,repo fork owner/repo, and commands such asissue view 123 -R owner/repoto operate on their GHE instance instead ofgithub.com?GITHUB_HOST=example.orgin their environment before invoking ahubcommand, and that solution is fine for programmatic use, but not ideal for casual use.hub clone repoprompt withSelect host:andgithub.com,example.orgas options. This works, but I find the interactive prompt sometimes tiresome considering I'm cloning fromgithub.com99% of the time./cc @ampinsk @billygriffin