【问题标题】:Openshift - rhc tail commandOpenshift - rhc 尾命令
【发布时间】:2014-06-13 10:40:04
【问题描述】:

当我尝试从应用程序目录直接运行 rhc tail 时,它总是告诉:

C:\Documents and Settings\user\git\service>rhc tail 你必须指定 带有 -a 的应用程序,或从 Git 目录中运行此命令 从 OpenShift 克隆。用法:rhc tail 传递 '--help' 到 查看完整的选项列表

我在它之前克隆了应用程序。 是什么原因?

【问题讨论】:

    标签: logging openshift tail openshift-client-tools


    【解决方案1】:

    如果你使用了git clone <repository_url>,那么你必须使用rhc tail --app <app_name> 命令。如果您希望 rhc tail 为您找出应用程序名称,那么您应该使用rhc git-clone --app <app_name> 命令来克隆存储库。 rhc git-clone 命令向您的 .git/config 文件添加了一些属性,OpenShift 使用这些属性来确定应用程序名称,如下所示:

    [rhc]
        app-id = 64546576654634028d
        app-name = example
        domain-name = example
    

    【讨论】:

    • 实际上,如果我们从 rhc 创建应用程序,我们不会从 净克隆应用程序,是吗?它会自动克隆。
    【解决方案2】:

    更新文件 .git/config 以包含此部分:

    [rhc]
        app-id = <your_app_id>
        app-name = <your_app_name>
        domain-name = <your_app_domain>
    

    实际上,这些值应该出现在此文件中,就在 [remote "origin"] 部分的上方几行。结帐此行:

    url = ssh://<your_app_id>@<your_app_name>-<your_app_domain>.rhcloud.com/~/git/portfolio.git/
    

    您可以使用此变量中声明的值来更新 rhc 客户端的信息。

    【讨论】:

      猜你喜欢
      • 2013-06-29
      • 1970-01-01
      • 2023-03-19
      • 2016-04-30
      • 2023-03-19
      • 1970-01-01
      • 2014-10-18
      • 2015-05-04
      • 2015-10-13
      相关资源
      最近更新 更多