0

I have a react based application that pulls in code from another private repository.

In my package.json this appears as

"mylib": "github:orgname/mylib"

And it all works locally.

When I deploy to Azure App Service I get the following error

npm ERR! Error while executing: 
7npm ERR! C:\Program Files\Git\bin\git.EXE ls-remote -h -t ssh://git@github.com/orgname/mylib.git 
8npm ERR! 
9npm ERR! Host key verification failed. 
10npm ERR! fatal: Could not read from remote repository. 
11npm ERR! 
12npm ERR! Please make sure you have the correct access rights 
13npm ERR! and the repository exists. 
14npm ERR! 
15npm ERR! exited with error code: 128

I grabbed the public key from

https://[appname].scm.azurewebsites.net/api/sshkey?ensurePublicKey=1

and tried adding it to the account, organisation and repo on github, but I’m still getting the same error.

Is there something obvious I’m missing here?

lookitskris
  • 678
  • 1
  • 6
  • 23
  • Hello @lookitskris Could you please refer this https://stackoverflow.com/questions/66894919/how-can-i-configure-github-actions-to-build-my-azure-static-web-app-with-a-depen – AjayKumarGhose Dec 16 '21 at 07:03

1 Answers1

0

To deploy an application to Azure app service using Private GitHub repository. Below is the one of workaround you can follow:

  • I have created an demo application in VS Studio (.net) and push the project to my GitHub with private repository. enter image description here

  • created an app service in Azure Portal . And Go to Deployment center>Select your organization as GitHub, repository(your private repository) and save it.

enter image description here

enter image description here

  • After sometime your application will reflect on Azure portal

enter image description here

For more information please refer this below links:

AjayKumarGhose
  • 4,257
  • 2
  • 4
  • 15