-
Notifications
You must be signed in to change notification settings - Fork 7.7k
Closed
Labels
bugSomething isn't workingSomething isn't workinggh-variablerelating to the gh variable commandrelating to the gh variable commandp1Affects a large population and inhibits workAffects a large population and inhibits work
Description
Describe the bug
Most of gh variable/secret command does not working on enterprise due to invalid hostname such as:
gh variable getgh variable deletegh secret delete
UPDATED: @andyfeller removed remove aliases from the above list being redundant to delete as well as gh secret get because this command does not exist
Context:
- I use SSH to clone repository (doesn't matter as I have tried to git clone using HTTPS)
- git version 2.25.1
- gh version 2.51.0 (2024-06-13)
- GitHub Enterprise Server 3.9.13
Steps to reproduce the behavior
-
chdir to repository
-
Check FOO_BAR is exist
$ gh variable list
NAME VALUE UPDATED
FOO_BAR FOO about 58 minutes ago
- Get FOO_BAR without
--repoarg
$ gh variable get FOO_BAR
[git remote -v]
[git config --get-regexp ^remote\..*\.gh-resolved$]
* Request at 2024-07-01 12:36:05.457290778 +0700 WIB m=+0.061940590
* Request to https://api.github.com/repos/owner-name/repo-name/actions/variables/FOO_BAR
* Request took 752.878786ms
variable FOO_BAR was not found
- Get FOO_BAR with
--repoarg (https://, http://, without protocol)
$ gh variable get FOO_BAR --repo https://enterprise-github.com/owner-name/repo-name
* Request at 2024-07-01 12:35:21.358327957 +0700 WIB m=+0.047103012
* Request to https://api.github.com/repos/owner-name/repo-name/actions/variables/FOO_BAR
* Request took 638.744861ms
variable FOO_BAR was not found
- Get FOO_BAR with REST API
$ gh api -H "Accept: application/vnd.github+json" \
-H "X-GitHub-Api-Version: 2022-11-28" \
--hostname enterprise-github.com
/repos/owner-name/repo-name/actions/variables/FOO_BAR
* Request at 2024-07-01 12:39:02.137287999 +0700 WIB m=+0.047488350
* Request to https://enterprise-github.com/api/v3/repos/owner-name/repo-name/actions/variables/FOO_BAR
* Request took 747.641379ms
{
"name": "FOO_BAR",
"value": "FOO",
"created_at": "2024-07-01T04:32:35Z",
"updated_at": "2024-07-01T04:32:35Z"
}
andyfeller
Metadata
Metadata
Assignees
Labels
bugSomething isn't workingSomething isn't workinggh-variablerelating to the gh variable commandrelating to the gh variable commandp1Affects a large population and inhibits workAffects a large population and inhibits work