Commit graph

17 commits

Author SHA1 Message Date
Azeem Sajid
f236c7efab Fix remoteResolver caching issue 2025-02-20 13:15:23 +01:00
William Martin
4da4c82090 Rename secret BaseRepo func 2025-01-15 14:55:17 +01:00
William Martin
1d38230675
Move config interfaces into gh package (#9060) 2024-05-10 10:39:36 +02:00
Sam Coe
dbc2f05124
Update go-gh to v2 (#7299)
* Update go-gh

* Update code for go-gh v2
2023-04-16 15:34:23 +10:00
Benjamin Levesque
9596fd5368
Skip checking keyring for token in certain scenarios (#7169) 2023-03-18 08:59:43 +11:00
Sam Coe
c9a2d85793
Cleanup config.AuthToken and config.DefaultHost methods (#7049) 2023-02-28 00:24:45 +00:00
Sam Coe
a33e12a21d
Refactor Config interface in preperation for encrypted token storage (#7033) 2023-02-28 10:51:12 +11:00
casswedson
00bc550dc6 chore: typo hunting ft. codespell 2022-07-09 21:41:09 -05:00
Sam Coe
cacff4ad6d
Use go-gh config package (#5771) 2022-06-23 11:50:04 +00:00
Sam Coe
743a747804
Use go-gh for SSH hostname alias translation (#5654) 2022-06-08 21:32:29 +00:00
Mislav Marohnić
11fbb60ae7 Rename the module to "github.com/cli/cli/v2" 2021-08-25 12:41:30 +02:00
Mislav Marohnić
82c6fb7d1a Add a note about the dummy GHE hostname 2021-07-26 18:59:53 +02:00
Mislav Marohnić
aec0f10041 Fix error message when using GH_ENTERPRISE_TOKEN but host is ambiguous
Before:

    $ GH_ENTERPRISE_TOKEN="..." gh pr create
    could not find hosts config: not found

Now:

    $ GH_ENTERPRISE_TOKEN="..." gh pr create
    set the GH_HOST environment variable to specify which GitHub host to use

Also amends `gh help environment` documentation to suggest the use of
GH_HOST when scripting operations with GitHub Enterprise repositories.
2021-07-20 14:11:07 +02:00
Sam
9ec1e21d4c
Default to GHES host if only GHES is authenticated (#3286) 2021-03-30 16:51:00 +02:00
Nate Smith
c7eb57d443
respect GH_HOST when resolving remotes (#2301)
* vim to gitignore

* respect GH_HOST in Resolver

* slight restructure, add a test

* grammar fix
2020-11-19 12:59:18 -06:00
vilmibm
ff9ecd2944 CTA for ghes remote auth case 2020-08-18 17:57:52 -05:00
Mislav Marohnić
4315c09501 Ignore non-pre-authenticated hosts when parsing git remotes
This ensures that while having git remotes to point to either
`github.com` or authenticated GHE instances, adding another git remote
pointing to an unrelated host won't change the remote resolution in any
way, even if the unrelated remote is called `upstream` or `github` (and
thus normally took precedence).
2020-08-12 18:13:05 +02:00