File tree Expand file tree Collapse file tree 1 file changed +5
-1
lines changed
cmd/buf/internal/command/registry/registrylogin Expand file tree Collapse file tree 1 file changed +5
-1
lines changed Original file line number Diff line number Diff line change @@ -28,6 +28,7 @@ import (
2828 "github.com/bufbuild/buf/private/buf/bufapp"
2929 "github.com/bufbuild/buf/private/buf/bufcli"
3030 "github.com/bufbuild/buf/private/bufpkg/bufconnect"
31+ "github.com/bufbuild/buf/private/bufpkg/buftransport"
3132 "github.com/bufbuild/buf/private/gen/proto/connect/buf/alpha/registry/v1alpha1/registryv1alpha1connect"
3233 registryv1alpha1 "github.com/bufbuild/buf/private/gen/proto/go/buf/alpha/registry/v1alpha1"
3334 "github.com/bufbuild/buf/private/pkg/connectclient"
@@ -271,7 +272,6 @@ func doBrowserLogin(
271272 container appext.Container ,
272273 remote string ,
273274) (string , error ) {
274- baseURL := "https://" + remote
275275 clientName , err := getClientName ()
276276 if err != nil {
277277 return "" , err
@@ -284,6 +284,10 @@ func doBrowserLogin(
284284 if err != nil {
285285 return "" , err
286286 }
287+ baseURL := buftransport .PrependHTTPS (remote )
288+ if appConfig .TLS == nil {
289+ baseURL = buftransport .PrependHTTP (remote )
290+ }
287291 client := httpclient .NewClient (appConfig .TLS )
288292 oauth2Client := oauth2 .NewClient (baseURL , client )
289293 // Register the device.
You can’t perform that action at this time.
0 commit comments