Google App Engine应用程序部署 [英] Google App Engine app deployment

查看:95
本文介绍了Google App Engine应用程序部署的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!

问题描述

我正在尝试按照他们的Python教程在Google Engine上部署基本的HelloWorld应用.我创建了一个 helloworld.py 文件和一个 app.yaml 文件,并从他们的在线教程中复制了代码.我注册了Google App Engine,并尝试了所有方法,但始终收到以下错误消息:

I'm trying to deploy a basic HelloWorld app on Google Engine following their tutorial for Python. I created a helloworld.py file and an app.yaml file and copied the code from their online tutorial. I signed up for Google App Engine and have tried everything but keep getting the following error:

2015-08-19 19:22:08,006 ERROR appcfg.py:2438 An error occurred processing file '': 
HTTP Error 403: Forbidden Unexpected HTTP status 403. Aborting. 
Error 403: --- begin server output ---
You do not have permission to modify this app (app_id=u'helloworld').
--- end server output ---
If deploy fails you might need to 'rollback' manually.
The "Make Symlinks..." menu option can help with command-line work.
*** appcfg.py has finished with exit code 1 ***

这是helloworld.py中的代码:

Here is the code from helloworld.py:

import webapp2

class MainPage(webapp2.RequestHandler):
    def get(self):
        self.response.headers['Content-Type'] = 'text/plain'
        self.response.write('Hello, Udacity!')

app = webapp2.WSGIApplication([
   ('/', MainPage),
   ], debug=True)

这是来自app.yaml文件的代码:

And here is my code from the app.yaml file:

application: helloworld
version: 1
runtime: python27
api_version: 1
threadsafe: true

handlers:
- url: /.*
  script: helloworld.app

权限是否存在问题,例如Google App或笔记本电脑的设置?我已经尝试过stackoverflow上的所有内容,因此任何新建议将不胜感激!!

Is there a problem with permissions i.e. Google App's or my laptop's settings? I have tried everything that's out there on stackoverflow so any new suggestions will be much appreciated!!

推荐答案

在我的情况下,我被拒绝了,因为appcfg将我的ouauth2令牌保存在文件~/.appcfg_oauth2_tokens中,而这恰好是appengine的另一个帐户.只需删除文件,然后重试.它应该工作.这是在Mac中,但是我不确定Windows.

In my case, I got refused because the appcfg save my ouauth2 token in the file ~/.appcfg_oauth2_tokens, which happen to be another account of appengine . Simply remove the file and try again. It should work. This is in Mac, I am not sure about windows though.

这篇关于Google App Engine应用程序部署的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!

查看全文
登录 关闭
扫码关注1秒登录
发送“验证码”获取 | 15天全站免登陆