radius-project / radius

Radius is a cloud-native, portable application platform that makes app development easier for teams building cloud-native apps.
https://radapp.io
Apache License 2.0
1.45k stars 92 forks source link

Radius download using Powershell fails with: PowerShell requires an execution policy of 'RemoteSigned'. #7141

Open vinayada1 opened 7 months ago

vinayada1 commented 7 months ago

Steps to reproduce

From Discord thread:-

Hi Team, I am trying to download Radius through poweshell as I am windows user, but no sucess as it's blocking:

❯ iwr -useb "https://raw.githubusercontent.com/radius-project/radius/main/deploy/install.ps1" | iex

PowerShell requires an execution policy of 'RemoteSigned'.
To make this change please run:
'Set-ExecutionPolicy RemoteSigned -scope CurrentUser'
Trying to download exe, but it's saying suspicious download and never completes:

Please suggest? Ajmal — 02/03/2024 5:57 AM for my PC:

❯ Get-ExecutionPolicy
AllSigned

I have downloaded the PS file https://raw.githubusercontent.com/radius-project/radius/main/deploy/install.ps1, make that signed, even when I am running getting same error:

❯ .\rad-install.ps1

PowerShell requires an execution policy of 'RemoteSigned'.
To make this change please run:
'Set-ExecutionPolicy RemoteSigned -scope CurrentUser'

gpltaylor — Yesterday at 4:50 AM ah ok, so it's not possible with the default recipe. That explains why I can't find it 🙂 Emanuel — Yesterday at 7:53 AM If you run Set-ExecutionPolicy Bypass -Scope CurrentUser before the installation command, you should be able to install it anyway. Ajmal — Yesterday at 5:24 PM @Emanuel Thanks! but unfortunately looks like this is also restricted :

❯ Set-ExecutionPolicy Bypass -Scope CurrentUser

Execution Policy Change
The execution policy helps protect you from scripts that you do not trust. Changing the execution policy might expose
you to the security risks described in the about_Execution_Policies help topic at
https:/go.microsoft.com/fwlink/?LinkID=135170. Do you want to change the execution policy?
[Y] Yes  [A] Yes to All  [N] No  [L] No to All  [S] Suspend  [?] Help (default is "N"): A
Set-ExecutionPolicy : Windows PowerShell updated your execution policy successfully, but the setting is overridden by
a policy defined at a more specific scope.  Due to the override, your shell will retain its current effective
execution policy of AllSigned. Type "Get-ExecutionPolicy -List" to view your execution policy settings. For more
information please see "Get-Help Set-ExecutionPolicy".
At line:1 char:1
+ Set-ExecutionPolicy Bypass -Scope CurrentUser
+ ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
    + CategoryInfo          : PermissionDenied: (:) [Set-ExecutionPolicy], SecurityException
    + FullyQualifiedErrorId : ExecutionPolicyOverride,Microsoft.PowerShell.Commands.SetExecutionPolicyCommand

Image The exe is not downloadable. Looks like it's broken. Can we fix this please? Emanuel — Yesterday at 9:36 PM It's not the exe file that is broken, but rather your environment that likely has policies to block downloads of unsigned files. You could try to get around it in a few other ways (execution policy is a safety feature and not a security one), but maybe your organization has set up a process for downloading open source software? Ajmal — Today at 12:14 AM Thanks Emanuel ! by doing some registry change, it's all working!!! Is there any chance we can publish signed exe Emanuel ? Emanuel — Today at 1:00 AM I'll have to refer you to the Radius team on that one 🙂

Observed behavior

No response

Desired behavior

The install should not fail

Workaround

No response

rad Version

0.30.0

Operating system

Windows

Additional context

https://discord.com/channels/1113519723347456110/1113519723930468455/1203335566972817478

Would you like to support us?

AB#11124

radius-triage-bot[bot] commented 7 months ago

:wave: @vinayada1 Thanks for filing this bug report.

A project maintainer will review this report and get back to you soon. If you'd like immediate help troubleshooting, please visit our Discord server.

For more information on our triage process please visit our triage overview

azure-boards[bot] commented 7 months ago

✅ Successfully linked to Azure Boards work item(s):

radius-triage-bot[bot] commented 7 months ago

:+1: We've reviewed this issue and have agreed to add it to our backlog. Please subscribe to this issue for notifications, we'll provide updates when we pick it up.

We also welcome community contributions! If you would like to pick this item up sooner and submit a pull request, please visit our contribution guidelines and assign this to yourself by commenting "/assign" on this issue.

For more information on our triage process please visit our triage overview