【问题标题】:Where to enter oAuth in Netbeans to deploy application on Google App Engine在Netbeans哪里输入oAuth在Google App Engine上部署应用
【发布时间】:2015-05-21 20:28:59
【问题描述】:

完成我的项目后,我右键单击我的项目,以便将其部署到 Google App Engine 上。在我单击“部署到 Google App Engine”时的可用选项中,它会将我重定向到要求某些权限的浏览器。当我接受它时,它最终会出现一个带有一些令牌的页面,其中包含以下消息:“请复制此代码,切换到您的应用程序并将其粘贴到那里:”

同时在 Netbeans 控制台中我看到了错误

.Please enter code: Either the access code is invalid or the OAuth token is revoked.Details: invalid_grant

我没有收到任何弹出窗口来输入我从 Google 获得的身份验证令牌。

在哪里输入此代码?

我使用的是 Netbeans 7.3。

【问题讨论】:

    标签: google-app-engine netbeans


    【解决方案1】:

    我有同样的问题。我刚刚使用 App Engine SDK bin 目录 (Java App Engine) 中的 update exec 从终端部署。

    所以我的命令是:

    $ ./appcfg.sh update ~/Development/path_to_app
    

    这样您就可以在终端中输入验证码。之后您应该可以通过 NetBeans 进行部署(确保您已在 NetBeans 中设置了电子邮件和密码)。

    【讨论】:

    • 对此还有什么其他建议吗?我在 netbeans 8.2 同样的问题上也不知道把命令放在哪里...
    • @Kdean571 您使用的是 Windows 还是 Linux?在 Windows 中,我相信您应该在 /bin 目录中有一个 appcfg.cmd 文件。例如 C:\Users\user\Downloads\appengine-java-sdk-1.9.17\bin 。您应该可以在此处打开命令提示符窗口并使用更新命令:appcfg.cmd update "C:/path/to/app/directory/"
    • 我在 Windows 上...导航到该文件夹​​它会打开 cmd 提示符,但在我有机会读取/键入任何命令之前关闭..cloud SDK shell 执行良好但不断收到 java.illegal arg 异常预期命令然后出现命令列表...
    • 应该添加它在本地主机上运行良好......所以查看错误它的特定语法与导致问题的更新命令
    • @Kdean571 我刚刚在 Windows 上试了一下,效果很好:appengine-java-sdk-1.9.4\bin>appcfg update "C:\Development\my_app\web"
    【解决方案2】:

    我几天前刚遇到这个问题。 对不起,如果我解释不正确,请告诉我这是我的第一篇文章。

    要解决它,您需要运行cmd。去开始运行cmd

    导航到C:\appengine-java-sdk-1.9.17\bin 或您的应用引擎位置,然后键入:

    appcfg update "C:/path/to/app/directory/"

    然后它将运行并向您显示放置代码的位置。 例如:

    C:\Ali\appengine-java-sdk-1.9.27\bin>appcfg update "C:\Users\almiskea\Documents\NetBeansProjects\WebApplication5\web"
    Please enter code: 
    

    放好之后,就会出现这个:

    Reading application configuration data...
    
    Beginning interaction for module default...
    0% Created staging directory at: C:\Users\almiskea\AppData\Local\Temp\appcfg7644042675237095331.tmp
    5% Scanning for jsp files.
    8% Compiling jsp files.
    20% Scanning files on local disk.
    25% Initiating update.
    28% Cloning 13 application files.
    40% Uploading 4 files.
    52% Uploaded 1 files.
    61% Uploaded 2 files.
    68% Uploaded 3 files.
    73% Uploaded 4 files.
    77% Initializing precompilation...
    80% Sending batch containing 4 file(s) totaling 5KB.
    90% Deploying new version.
    95% Closing update: new version is ready to start serving.
    98% Uploading index definitions.
    
    Update for module default completed successfully.
    Success.
    Cleaning up temporary files for module default...
    

    然后部署您的应用程序。

    【讨论】:

      猜你喜欢
      • 1970-01-01
      • 2015-11-13
      • 2019-04-22
      • 2023-03-02
      • 2015-02-13
      • 1970-01-01
      • 2019-05-18
      • 2020-08-02
      • 1970-01-01
      相关资源
      最近更新 更多