File tree Expand file tree Collapse file tree 1 file changed +2
-13
lines changed
Expand file tree Collapse file tree 1 file changed +2
-13
lines changed Original file line number Diff line number Diff line change @@ -453,19 +453,8 @@ def stream_download( # noqa: C901
453453 if "Authorization" in request_headers and request_headers [
454454 "Authorization"
455455 ].startswith ("Bearer " ):
456- # SSO Bearer tokens don't work with /basic/ endpoints - need API key
457- if not quiet :
458- click .echo (
459- "Warning: SSO authentication detected. Private repository downloads require an API key." ,
460- err = True ,
461- )
462- click .echo ("Options:" , err = True )
463- click .echo (
464- " 1. Set environment variable: export CLOUDSMITH_API_KEY=your_api_key" ,
465- err = True ,
466- )
467- click .echo (" 2. Use command option: --api-key YOUR_KEY" , err = True )
468- # Remove Authorization header since it won't work
456+ bearer_token = request_headers ["Authorization" ].split ("Bearer " , 1 )[1 ]
457+ auth = ("token" , bearer_token )
469458 request_headers = {
470459 k : v for k , v in request_headers .items () if k != "Authorization"
471460 }
You can’t perform that action at this time.
0 commit comments