I’m having this error when trying to deploy an Azure Web App using Github repo.
{
"status": "Failed",
"error": {
"code": "BadRequest",
"message": "<Error xmlns="http://schemas.microsoft.com/windowsazure" xmlns:i="http://www.w3.org/2001/XMLSchema-instance"><Code>BadRequest</Code><Message>Repository 'UpdateSiteSourceControl' operation failed with Microsoft.Web.Hosting.SourceControls.OAuthException: GitHub GetSecretsPublicKey: Bad credentials
n at Microsoft.Web.Hosting.SourceControls.GitHubProxy.< ...
I used the authorize button in the Deployment Center to link the Github account. I’ve tried to revoke the old access from Azure in Github and tried again but it’s not working.
2
Answers
Initially even I got the same error.
This is because
Azure App Service
is not registered inAuthorized OAuth Apps
.Follow the below steps to regsiter the
Azure App Service
.Azure App Service
.GitHub
=> in Right hand pane selectSettings
=> selectDeveloper settings
in the left hand pane =>OAuth Apps
=>Register a new Application
.ClientID
andClient Secret
will be created, copy those for later use.Azure App Service
=>Authentication
=>Add Identity Provider
=> selectGitHub
and provide theClientID
andSecretID
fromGitHub
.Azure App Service
=>Deployment center
= >select source asGitHub
and click onChange Account
=>Authorize AzureAppService
.Azure App Service
inGitHub
=>Applications
=>Authorized OAuth Apps
.GitHub
inDeployment center
.For me, I got the same error. the solution was to wait for 15 minutes or so.
It is ok to get the error, just wait for some time and try to run the deployment again, it should work.