我遵循以下说明如何使用Azure CLI将zip文件部署到Azure函数应用程序的文档:
https://docs.microsoft.com/en-us/cli/azure/functionapp/deployment/source?view=azure-cli-latest#az-functionapp-deployment-source-config-zip
我通过命令登录到了Azure(登录成功,它生成了一个JSON对象作为回报)
az login
之后,我运行了将zip文件部署到函数应用程序的命令
az functionapp deployment source config-zip --name testmigfuncapp --resource-group g_rscgroup --src "C:\Code\Azure Functions\Proj"
作为回应,我得到
[Errno 13] Permission denied: 'C:\\Code\\Azure Functions\\Proj'
Traceback (most recent call last):
File "C:\Users\VSSADM~1\AppData\Local\Temp\pip-install-jvxpk9ku\knack\knack\cli.py", line 197, in invoke
File "C:\Users\VSSADM~1\AppData\Local\Temp\pip-install-jvxpk9ku\azure-cli-core\azure\cli\core\commands\__init__.py", line 373, in execute
File "C:\Users\VSSADM~1\AppData\Local\Temp\pip-install-jvxpk9ku\six\six.py", line 693, in reraise
File "C:\Users\VSSADM~1\AppData\Local\Temp\pip-install-jvxpk9ku\azure-cli-core\azure\cli\core\commands\__init__.py", line 347, in execute
File "C:\Users\VSSADM~1\AppData\Local\Temp\pip-install-jvxpk9ku\azure-cli-core\azure\cli\core\commands\__init__.py", line 182, in __call__
File "C:\Users\VSSADM~1\AppData\Local\Temp\pip-install-jvxpk9ku\azure-cli-core\azure\cli\core\__init__.py", line 440, in default_command_handler
File "C:\Users\VSSADM~1\AppData\Local\Temp\pip-install-jvxpk9ku\azure-cli-appservice\azure\cli\command_modules\appservice\custom.py", line 257, in enable_zip_deploy
PermissionError: [Errno 13] Permission denied: 'C:\\Code\\Azure Functions\\Proj'
我在运行Windows 10的Windows计算机上。
PS:如果有人能指导我如何通过Visual Studio的功能应用程序扩展将代码部署到功能应用程序,那就太好了(我需要了解CLI部署,因为我需要通过命令行从内部部署,因为那里没有Visual Studio代码)。