简体   繁体   中英

`serverless deploy` command in azure does not complete no response received in terminal

I am using serverless framework with azure functions for microservices and installed all the dependencies and there are no errors but when i run serverless deploy command it produces a code

$ serverless deploy
Serverless: Packaging service...
Serverless: Logging in to Azure
Serverless: Paste this code (copied to your clipboard) into the launched browser, and complete the authentication process: HS******

After that this Microsoft Link opens in the browser and ask for the code then i have put the code HS****** that was received and it asks for login and after i login with my azure account it opens a new link displaying this message

You have signed in to the Microsoft Azure Cross-platform Command Line Interface application on your device. You may now close this window.

After closing the window nothing happens in the terminal the terminal does nothing and it got stuck i have tried many times but no help.

Seems like your credentials are not completely set.

Setting up your Azure credentials

Once the serverless-azure-functions plugin is installed, it expects to find your Azure credentials via a set of well-known environment variables. These will be used to actually authenticate with your Azure account, so that the Serverless CLI can generate the necessary Azure resources on your behalf when you request a deployment (see below).

The following environment variables must be set, with their respective values:

  • azureSubId - ID of the Azure subscription you want to create your service within
  • azureServicePrincipalTenantId - ID of the tenant that your service principal was created within
  • azureServicePrincipalClientId - ID of the service principal you want to use to authenticate with Azure
  • azureServicePrincipalPassword - Password of the service principal you want to use to authenticate with Azure

For details on how to create a service principal and/or acquire your Azure account's subscription/tenant ID, refer to the Azure credentials documentation.

The technical post webpages of this site follow the CC BY-SA 4.0 protocol. If you need to reprint, please indicate the site URL or the original address.Any question please contact:yoyou2525@163.com.

 
粤ICP备18138465号  © 2020-2024 STACKOOM.COM