-
Notifications
You must be signed in to change notification settings - Fork 8k
Closed
Labels
bugSomething isn't workingSomething isn't workingneeds-investigationCLI team needs to investigateCLI team needs to investigatepriority-1Affects a large population and inhibits workAffects a large population and inhibits work
Description
Describe the bug
The CLI crashes when I try to download a release with --repo on windows.
download without --repo works from the current repo fails in --repo is specified
list with --repo seems to work
Steps to reproduce the behavior
gh release download --repo "cli/cli" "v2.26.1"
or
gh release view--repo "cli/cli" "v2.26.1"
Expected vs actual behavior
I expect the repo to download but instead the command panics
Logs
> gh --version
gh version 2.26.1 (2023-04-04)
https://github.com/cli/cli/releases/tag/v2.26.1
> gh release download --repo "cli/cli" "v2.26.1"
⣾panic: runtime error: invalid memory address or nil pointer dereference
[signal 0xc0000005 code=0x0 addr=0x38 pc=0x489337]
goroutine 26 [running]:
github.com/zalando/go-keyring.windowsKeychain.Get({}, {0xc0003dc410?, 0x3?}, {0x0?, 0xa?})
/home/runner/go/pkg/mod/github.com/zalando/go-keyring@v0.2.2/keyring_windows.go:21 +0x97
github.com/zalando/go-keyring.Get(...)
/home/runner/go/pkg/mod/github.com/zalando/go-keyring@v0.2.2/keyring.go:37
github.com/cli/cli/v2/internal/config.(*AuthConfig).TokenFromKeyring(0xfb217e?, {0xfb217e?, 0x1?})
/home/runner/work/cli/cli/internal/config/config.go:171 +0x53
github.com/cli/cli/v2/internal/config.(*AuthConfig).Token(0xc000526b60, {0xfb217e, 0xa})
/home/runner/work/cli/cli/internal/config/config.go:135 +0x68
github.com/cli/cli/v2/api.AddAuthTokenHeader.func1(0xc000616000)
/home/runner/work/cli/cli/api/http_client.go:96 +0xa9
github.com/cli/cli/v2/api.funcTripper.RoundTrip(...)
/home/runner/work/cli/cli/api/http_client.go:125
github.com/cli/cli/v2/api.AddASCIISanitizer.func1(0xb?)
/home/runner/work/cli/cli/api/sanitize_ascii.go:26 +0x3a
github.com/cli/cli/v2/api.funcTripper.RoundTrip(...)
/home/runner/work/cli/cli/api/http_client.go:125
github.com/cli/cli/v2/api.ExtractHeader.func1.1(0x0?)
/home/runner/work/cli/cli/api/http_client.go:109 +0x47
github.com/cli/cli/v2/api.funcTripper.RoundTrip(...)
/home/runner/work/cli/cli/api/http_client.go:125
net/http.send(0xc000616000, {0x1ee4380, 0xc00000a760}, {0xf60c80?, 0x2882d9f0b01?, 0x0?})
/opt/hostedtoolcache/go/1.19.7/x64/src/net/http/client.go:251 +0x5f7
net/http.(*Client).send(0xc00075d4d0, 0xc000616000, {0x0?, 0xc0007b9c50?, 0x0?})
/opt/hostedtoolcache/go/1.19.7/x64/src/net/http/client.go:175 +0x9b
net/http.(*Client).do(0xc00075d4d0, 0xc000616000)
/opt/hostedtoolcache/go/1.19.7/x64/src/net/http/client.go:715 +0x8fc
net/http.(*Client).Do(...)
/opt/hostedtoolcache/go/1.19.7/x64/src/net/http/client.go:581
github.com/cli/cli/v2/pkg/cmd/release/shared.fetchReleasePath({0x1eec4d8, 0xc0005280c0}, 0xc0007b9fa0?, {0xc000039a80?, 0x3?}, {0xc000610000, 0x23})
/home/runner/work/cli/cli/pkg/cmd/release/shared/fetch.go:206 +0xe9
github.com/cli/cli/v2/pkg/cmd/release/shared.FetchRelease.func1()
/home/runner/work/cli/cli/pkg/cmd/release/shared/fetch.go:140 +0x1a7
created by github.com/cli/cli/v2/pkg/cmd/release/shared.FetchRelease
/home/runner/work/cli/cli/pkg/cmd/release/shared/fetch.go:138 +0x15eReactions are currently unavailable
Metadata
Metadata
Assignees
Labels
bugSomething isn't workingSomething isn't workingneeds-investigationCLI team needs to investigateCLI team needs to investigatepriority-1Affects a large population and inhibits workAffects a large population and inhibits work