我在openshift上部署了一个Jhipster应用程序,我有以下错误。
第一条消息可能令人困惑,但这是我第二次尝试部署,所以意味着代码仍然被推送
Adding files for initial commit
On branch master
Your branch is up-to-date with 'origin/master'.
nothing to commit, working directory clean
Re-pushing the existing "deploy/openshift" build...
要部署,我们需要将钩子修改为远程存储库中的可执行文件。但是默认情况下不会推送这些文件(包含在gitignore中),所以我强制提交并启动以下cmd
Chmod action hooks
× { [Error: Command failed: C:\Windows\system32\cmd.exe /s /c "git update-index --chmod=+x .openshift/action_hooks/build && git update-index --chmod=+x .openshift/action_hooks/start && git update-index --chmod=+x .openshift/action_hooks/stop && git commit -m "Chmod""
error: deploy/openshift/.openshift/action_hooks/build: cannot add to the index - missing --add option?
fatal: Unable to process path deploy/openshift/.openshift/action_hooks/build
]
killed: false,
code: 128,
signal: null,
cmd: 'C:\\Windows\\system32\\cmd.exe /s /c "git update-index --chmod=+x .openshift/action_hooks/build && git update-index --chmod=+x .openshift/action_hooks/start && git update-index --chmod=+x .openshift/action_hooks/stop && git commit -m "Chmod""' }
Uploading your initial application code.
This may take several minutes depending on your connection speed...
× ssh: connect to host ------i remove host--------- port 22: Bad file number
× fatal: Could not read from remote repository.
Why the cmd git update-index fail, is on relation by 22: bad file
关心并感谢您的帮助
答案 0 :(得分:0)
您可能已经尝试过部署一次。因此,您现在在项目根目录中有一个“deploy”文件夹,该文件夹与您的旧的openshift分配的git存储库相关联(您已删除并且无法访问该存储库)。只需从根目录中删除/删除“deploy”文件夹,然后重试。您可以在启动deploy命令时通过顶部的一行确认这种情况,该命令指出“找到现有的git remote”。希望这不是一个错误的答案,并有助于...