An Azure service that provides hosted, universal storage for Azure app configurations.
Hello @Charanjit Singh
Based on the error, I agree that this does not appear to be a GitHub PAT, repository, or branch issue.
The important part of the exception is:
UpdateSiteSourceControl → GetSSHKey → ensurePublicKey=True → 50-second timeout
The request times out against an internal App Service/Kudu endpoint while Azure tries to obtain or generate the SSH key. Since the same private repository and PAT work when configured through Deployment Center, this further suggests the failure occurs during the App Service source-control provisioning operation rather than GitHub authentication.
A few things I would check:
Confirm the SCM/Kudu endpoint is healthy:
https://<app-name>.scm.azurewebsites.net
You can also check App Service → Diagnose and solve problems for availability or deployment-related issues.
Check whether SCM access restrictions, Private Endpoint configuration, or scmIpSecurityRestrictions are configured on the Web App. App Service supports separate access restrictions for the SCM/Kudu site, so it's worth ruling these out.
Check the current source-control state:
az webapp deployment source show \
--name <app-name> \
--resource-group <resource-group>
If Terraform previously failed halfway through configuration, verify that it didn't leave a partial/stale source-control configuration before retrying.
As a diagnostic test, try configuring the same source-control settings using Azure CLI:
az webapp deployment source config \
--name <app-name> \
--resource-group <resource-group> \
--repo-url <repository-url> \
--branch <branch>
If this produces the same GetSSHKey timeout, that would further isolate the issue from Terraform and point toward the App Service control plane/backend operation.
Since you have reproduced this in Central India and UK South, and Deployment Center succeeds while the automated UpdateSiteSourceControl operation times out, I would recommend opening a Microsoft support case if the CLI/API test reproduces it. Include the Correlation ID, timestamp, subscription/resource details, regions tested, and the complete ExtendedCode 05007 exception so the App Service team can trace the backend request.
I would avoid repeatedly changing the GitHub PAT at this stage. The exception shows Azure timing out while retrieving the SSH key, not GitHub rejecting the credentials.
Sharing these references with you:
Configure continuous deployment for Azure App Service | https://learn.microsoft.com/en-us/azure/app-service/deploy-continuous-deployment
Azure CLI – az webapp deployment source | https://learn.microsoft.com/en-us/cli/azure/webapp/deployment/source?view=azure-cli-latest
App Service Source Control REST API | https://learn.microsoft.com/en-us/rest/api/appservice/web-apps/create-or-update-source-control?view=rest-appservice-2025-05-01
Please "Accept the Answer" if this information helped you. This will help us and others in the community as well.