gcloud app deploy ERROR:获取应用程序的权限错误[apps / <project_name>]

时间:2018-04-11 23:00:15

标签: google-app-engine

我正在通过发出以下命令部署一个简单的Python 3 App Engine应用程序(Flexi环境):gcloud app deploy --version=ver0-1

并收到以下错误:ERROR: (gcloud.app.deploy) Permissions error fetching application [apps/<PROJECT_NAME>]. Please make sure you are using the correct project ID and that you have permission to view applications on the project.

当我发出以下命令时,我可以确认accountproject已正确设置:gcloud config list

[core]
account = GOOGLE_ACCOUNT_EMAIL_ID
disable_usage_reporting = True
project = PROJECT_NAME_I_WANT_TO_DEPLOY

Your active configuration is: [default]

Permissions前面有什么我遗漏的吗?我是GCP项目业主。我需要启用的任何附加API,以便在Flexi环境中使用App Engine部署

感谢您的任何线索!

2 个答案:

答案 0 :(得分:10)

解决了!使用项目名称而不是ID

答案 1 :(得分:1)

通过运行以下命令解决此问题:

function TServerMethods1.getImage(JSONobj: TJSONObject): Boolean;
var
  OutputStream : TMemoryStream;
  InputStream  : TStringStream;
  theImage     : TJPEGImage;   // using TJPEGImage instead of FMX.Graphics.TBitmap
begin
  var imageStr    :  string := JSONobj.GetValue('Image').Value;
  InputStream     := TStringStream.Create(imageStr);
  OutputStream    := TMemoryStream.Create;
  theImage        := TJPEGImage.Create;
  try
    InputStream.Position  := 0;
    TNetEncoding.Base64.Decode(InputStream, OutputStream);
    OutputStream.Position := 0;
    theImage.LoadFromStream(OutputStream);  // Now this line works fine!
  finally
    theStringStream.Free;
    theMemoryStream.Free;
  end;
  .
  .
  .
end;

其中PROJECT_ID是您的项目ID,

要查看正确的项目ID,您可能需要运行1. `gcloud config unset project` 2. `gcloud config set project PROJECT_ID`