gcloud预览应用程序部署返回400与消息应用程序引擎服务帐户没有足够的项目权限。 需要开发者或所有者

我试图将node.js应用程序部署到谷歌云平台,所以我采取了以下方法:

假设我的项目ID :“logging器”(#445533661888)

1)我按照这个文档链接来部署应用程序,链接: https : //cloud.google.com/nodejs/resources/frameworks/express

2)项目app.yaml包括:

runtime: nodejs vm: true service: default skip_files: - ^(.*/)?.*/node_modules/.*$ 

3)现在去谷歌云控制台 – > IAM&pipe理菜单,在这里我可以看到logger@appspot.gserviceaccount.com条目,我也已经添加到myemail@gmail.com所有者的权限到这个服务帐户

4)现在使用命令gcloud auth login进行身份validation,并使用myemail@gmail.com完成身份validation

4)现在我使用gcloud预览应用程序部署来开始部署,在这个请求的响应我得到错误的请求错误400和消息为

App引擎服务帐户对项目的权限不足。 需要开发者或所有者

我正在呈现堆栈跟踪:

 C:\Users\Maulikwin8>gcloud config list Your active configuration is: [default] [app] suppress_change_warning = true [core] account = myemail@gmail.com disable_usage_reporting = False project = logger C:\Users\Maulikwin8>cd C:\Users\Maulikwin8\Documents\swan\rnd\node-express-js\nodejs-docs-samples-master\appengine\express C:\Users\Maulikwin8\Documents\swan\rnd\node-express-js\nodejs-docs-samples-master\appengine\express>gcloud preview app deploy --verbosity=debug DEBUG: Running gcloud.preview.app.deploy with Namespace(__calliope_internal_deepest_parser=ArgumentParser(prog='gcloud.preview.app.deploy', usage=None, description="*(BETA)* This command is used to deploy both code and configuration to the App Engine\nserver. As an input it takes one or more ``DEPLOYABLES'' that should be\nuploaded. A ``DEPLOYABLE'' can be a service's .yaml file or a configuration's\n.yaml file.", version=None, formatter_class=<class 'argparse.HelpFormatter '>, conflict_handler='error', add_help=False), account=None, authority_selector=None, authorization_token_file=None, bucket=None, cmd_func=<bound method Command.Run of <googlecloudsdk.calliope.backend.Command object at 0x03078550>>, command _path=['gcloud', 'preview', 'app', 'deploy'], configuration=None, credential_file_override=None, deployables=[], docker_build=None, document=None, force=False, format=None, h=None, help=None, http_timeout=None, ignore_bad_certs=False, image _url=None, log_http=None, project=None, promote=None, quiet=None, repo_info_file=None, server=None, stop_previous_version=None, trace_email=None, trace_log=None, trace_token=None, user_output_enabled=None, verbosity='debug', version=None). INFO: Refreshing access_token DEBUG: API endpoint: [https://appengine.googleapis.com/], API version: [v1beta4] You are about to deploy the following services: - logger/deployment (from [C:\Users\Maulikwin8\Documents\swan\rnd\node-express-js\nodejs-docs-samples-master\appengine\express\app.yaml]) Deployed URL: [https://deployment-dot-logger.appspot.com] Do you want to continue (Y/n)? Y Beginning deployment... DEBUG: No bucket specified, retrieving default bucket. DEBUG: Using bucket [<googlecloudsdk.api_lib.app.cloud_storage.BucketReference object at 0x03E7A7B0>]. DEBUG: Host: appengine.google.com DEBUG: _Authenticate configuring auth; needs_auth=False DEBUG: Sending request to https://appengine.google.com/api/vms/prepare?app_id=logger headers={'X-appcfg-api-version': '1', 'content-length': '0', 'Content-Type': 'application/octet-stream'} body= INFO: Attempting refresh to obtain initial access_token INFO: Refreshing access_token DEBUG: Got http error 400. DEBUG: Unexpected results: {'status': '400', 'alternate-protocol': '443:quic', 'content-length': '162', 'expires': 'Mon, 01 Jan 1990 00:00:00 GMT', 'server': 'Google Frontend', 'cache-control': 'no-cache', 'date': 'Wed, 11 May 2016 10:44:32 GMT', 'alt-svc': 'quic=":443"; ma=2592000; v="33,32,31,30,29,28,27,26,25"', 'content-type': 'text/plain'} WARNING: If this is your first deployment, please try again. DEBUG: (gcloud.preview.app.deploy) Server responded with code [400]: Bad Request Unexpected HTTP status 400. Failed Project Preparation (app_id='s~logger'). App Engine service account has insufficient permissions for project. Developer or owner required. Traceback (most recent call last): File "C:\Program Files (x86)\Google\Cloud SDK\google-cloud-sdk\lib\googlecloudsdk\calliope\cli.py", line 647, in Execute result = args.cmd_func(cli=self, args=args) File "C:\Program Files (x86)\Google\Cloud SDK\google-cloud-sdk\lib\googlecloudsdk\calliope\backend.py", line 1407, in Run resources = command_instance.Run(args) File "C:\Program Files (x86)\Google\Cloud SDK\google-cloud-sdk\lib\surface\preview\app\deploy.py", line 482, in Run deploy_command_util.DoPrepareManagedVms(clients.gae) File "C:\Program Files (x86)\Google\Cloud SDK\google-cloud-sdk\lib\googlecloudsdk\api_lib\app\deploy_command_util.py", line 260, in DoPrepareManagedVms gae_client.PrepareVmRuntime() File "C:\Program Files (x86)\Google\Cloud SDK\google-cloud-sdk\lib\googlecloudsdk\api_lib\app\appengine_client.py", line 207, in PrepareVmRuntime rpcserver.Send('/api/vms/prepare', app_id=self.project) File "C:\Program Files (x86)\Google\Cloud SDK\google-cloud-sdk\lib\googlecloudsdk\api_lib\app\util.py", line 365, in Send response = self._server.Send(*args, **kwargs) File "C:\Program Files (x86)\Google\Cloud SDK\google-cloud-sdk\lib\googlecloudsdk\third_party\appengine\tools\appengine_rpc_httplib2.py", line 298, in Send 'Unexpected HTTP status %s' % status) File "C:\Program Files (x86)\Google\Cloud SDK\google-cloud-sdk\lib\googlecloudsdk\third_party\appengine\tools\appengine_rpc_httplib2.py", line 82, in RaiseHttpError raise urllib2.HTTPError(url, response_info.status, msg, response_info, stream) RPCError: Server responded with code [400]: Bad Request Unexpected HTTP status 400. Failed Project Preparation (app_id='s~logger'). App Engine service account has insufficient permissions for project. Developer or owner required. ERROR: (gcloud.preview.app.deploy) Server responded with code [400]: Bad Request Unexpected HTTP status 400. Failed Project Preparation (app_id='s~logger'). App Engine service account has insufficient permissions for project. Developer or owner required. 

我得到的解决scheme,其实我想在myemail@gmail.com应该是项目的所有者。

但是我没有太在意“App引擎服务账号对项目的权限不足,开发者或者所有者需要”

脚步 :

  1. 转到开发者控制台中的服务帐户列表
  2. select“your-project-id@appspot.gserviceaccount.com”,点击权限。
  3. 将your-project-id@appspot.gserviceaccount.com添加到新成员,并将angular色分配为所有者。

它解决了问题