From e9e1b09c681c9de9cf4a16d87e9fd4d566497616 Mon Sep 17 00:00:00 2001 From: Phill MV Date: Fri, 22 Mar 2024 15:46:08 -0400 Subject: [PATCH] Fix for bug in gh attestation where the wrong hostname was being passed to the API client. --- pkg/cmd/attestation/api/client.go | 4 +--- 1 file changed, 1 insertion(+), 3 deletions(-) diff --git a/pkg/cmd/attestation/api/client.go b/pkg/cmd/attestation/api/client.go index b99fa5742..b0cafa6e9 100644 --- a/pkg/cmd/attestation/api/client.go +++ b/pkg/cmd/attestation/api/client.go @@ -7,7 +7,6 @@ import ( "strings" "github.com/cli/cli/v2/api" - "github.com/cli/cli/v2/internal/ghinstance" ioconfig "github.com/cli/cli/v2/pkg/cmd/attestation/io" "github.com/cli/go-gh/v2/pkg/auth" ) @@ -35,11 +34,10 @@ type LiveClient struct { func NewLiveClient(hc *http.Client, l *ioconfig.Handler) *LiveClient { host, _ := auth.DefaultHost() - serverURL := ghinstance.HostPrefix(host) return &LiveClient{ api: api.NewClientFromHTTP(hc), - host: strings.TrimSuffix(serverURL, "/"), + host: strings.TrimSuffix(host, "/"), logger: l, } }