Skip to content

Can't upgrade static web apps github setting #22668

@onlyillusion

Description

@onlyillusion

az feedback auto-generates most of the information requested below, as of CLI version 2.0.62

Related command

az staticwebapp update --name static-webapps --source https://github.com/xxx --branch main --token {{PAT}}

Describe the bug

When trying to update existing static web app with new private github repo setttings there is an error
Error code
BadRequest
Message
RepositoryToken is invalid. Please ensure the Github repository exists and the RepositoryToken is for an admin of the repository.
But when you create new one with the same token - everything ok.
When you trying to update existing static webapp with public github settings - everything ok
Problem related only updating private github repo settings.
Is there any chance to create new static web app without github part and then update to use with private github repo?

To Reproduce

az staticwebapp create -n {{MyStaticAppName}} -g {{someresourcegroup}} -l eastus2
az staticwebapp update -n {{MyStaticAppName}} -g {{someresourcegroup}} --source {{https://github.com/private_repo}} --branch {{master}} --token {{PAT}}
Expected behavior

Environment summary

azure-cli 2.36.0 *
core 2.36.0 *
telemetry 1.0.6
Extensions:
aks-preview 0.5.42
Dependencies:
msal 1.17.0
azure-mgmt-resource 20.0.0
Python (Linux) 3.8.13
[GCC 9.4.0]

Additional context

Metadata

Metadata

Assignees

No one assigned

    Labels

    Auto-AssignAuto assign by botService AttentionThis issue is responsible by Azure service team.act-observability-squadcustomer-reportedIssues that are reported by GitHub users external to the Azure organization.needs-team-attentionThis issue needs attention from Azure service team or SDK teamquestionThe issue doesn't require a change to the product in order to be resolved. Most issues start as thatstaticwebappaz staticwebapp

    Type

    No type

    Projects

    No projects

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions