Hacktoberfest 2026: le issue che i maintainer hanno segnato per ottobre, aperte e adatte ai principianti. Sfoglia le issue Hacktoberfest

New-WinGetSource fails with Unauthorized error on publish-azwebapp

Aperta
#234 1 commento 0 reazioni 1 assegnatario Vedi su GitHub

@RDMacLachlan ci sta già lavorando.

Dal 11/4/2024.

Valutazione

Questa issue non è ancora stata valutata.

Descrizione

Issue-Bug
Brief description of your issue

Attempting to create a New-WinGetSource fails on line 157 of New-ARMObjects.ps1:
$Result = Publish-AzWebApp -ArchivePath $RestSourcePath -ResourceGroupName $AzResourceGroup -Name $AzFunctionName -Force
with error:
..."\WinGet.RestSource-Winget.PowerShell.Source\Library\New-ARMObjects.ps1:157
Line |
157 | … $Result = Publish-AzWebApp -ArchivePath $RestSourcePath -ResourceGr …
| ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
| Deployment failed with status code Unauthorized"

Steps to reproduce

This command works until the last step of publishing as described above:

New-WinGetSource -Name "contosorestsource4" -ResourceGroup "rg-winget-rest-source" -Region "eastus" -ImplementationPerformance "Basic" -ShowConnectionInstructions -Verbose

I haven't figured out why it is failing but I noticed two things:

  1. a resource group with the same name as the one I gave was also created but without and hyphens. I get this warning for an RG I'm not using: "WARNING: Found an existing Resource Group matching the name of rgwingetrestsource. Will not create a new Resource Group." this seems like a separate bug. If I look in my RGs this new RG does exist and there is nothing inside.

  2. The function app environment variables is missing a few values because their names cannot be found in the key vault. The "New-ARMObjects.ps1" script does not appear to attempt to create these missing key vault secrets with the names expected in the Function App environment variables so I'm not sure why they are mentioned in the Function App config. Screenshot:
    image

Expected behavior

I expected the command to complete successfully

Actual behavior

Failure due to auth

Environment
Windows Package Manager v1.7.10861
Copyright (c) Microsoft Corporation. All rights reserved.

Windows: Windows.Desktop v10.0.22631.3296
System Architecture: X64
Package: Microsoft.DesktopAppInstaller v1.22.10861.0
Lingua principale
C#
Stelle
317
Fork
79
Merge medio
12h 22m
PR unite (30g)
3

Preparare l'ambiente

Come iniziare

  1. Leggi tutta la issue e poi la guida ai contributi del progetto.
  2. Commenta sulla issue per dire che te ne occupi tu — evita che due persone facciano lo stesso lavoro.
  3. Fai un fork del repository e lavora su un branch.
  4. Apri una pull request che faccia riferimento al numero della issue.

Altre issue di microsoft/winget-cli-restsource

Tutte le issue di microsoft/winget-cli-restsource

Issue simili

Altre issue su C#

Ricevi le nuove issue nella tua casella

Un breve riepilogo di issue GitHub adatte ai principianti.