Skip to content

Commit 6d6321a

Browse files
authored
Add setup guidance for self-hosted runners (#24)
1 parent 28dff55 commit 6d6321a

1 file changed

Lines changed: 23 additions & 0 deletions

File tree

README.md

Lines changed: 23 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -275,6 +275,29 @@ exclude-interactive-browser-credential: true
275275
276276
This can make the Action fail faster if for some reason the [EnvironmentCredential](https://learn.microsoft.com/dotnet/api/azure.identity.environmentcredential?view=azure-dotnet) fails. Similarly, if using for example an [AzureCliCredential ](https://learn.microsoft.com/dotnet/api/azure.identity.azureclicredential?view=azure-dotnet), then we want to skip over attempting to authenticate with the several methods that come before it in order.
277277
278+
### Self-Hosted Agents
279+
When running the Trusted Signing Action on a self-hosted agent/private runner you may encounter the following error:
280+
281+
`Exception calling "ShouldContinue" with "2" argument(s): "Windows PowerShell is in NonInteractive mode. Read and Prompt functionality is not available."`
282+
283+
This error is caused by the PowerShell NuGet package provider not being installed. By default, Windows PowerShell does not have these components installed.
284+
285+
To resolve this issue, install the NuGet package provider on the agent/runner with the following script:
286+
287+
```yaml
288+
if ((Get-PackageProvider -Name NuGet -ErrorAction Ignore) -eq $Null) {
289+
Install-PackageProvider -Name NuGet -Force -Scope CurrentUser;
290+
}
291+
```
292+
293+
Additionally, consider installing the latest version of PowerShellGet with the following script:
294+
295+
```yaml
296+
if ((Get-InstalledModule -Name PowerShellGet -MinimumVersion 2.2.1 -ErrorAction Ignore) -eq $Null) {
297+
Install-Module -Name PowerShellGet -MinimumVersion 2.2.1 -Scope CurrentUser -Force -AllowClobber;
298+
}
299+
```
300+
278301
## Contributing
279302
This project welcomes contributions and suggestions. Most contributions require you to agree to a
280303
Contributor License Agreement (CLA) declaring that you have the right to, and actually do, grant us

0 commit comments

Comments
 (0)