所以我一直试图将一些提交推到GitLab原点,但由于某种原因,管道一直失败。这是照片。输入图片描述
我创建了一个名为scroll -logo的不同分支,并试图使用git push origin将其与GitLab上的主分支合并,但不知何故管道一直显示错误。
我尝试了git pull来更新主分支到我本地机器上的最新版本,然后再次尝试推到GitLab,但它仍然不工作。
有人知道为什么会出现这个问题吗?
在一个类似的问题中,请确保您的GitLab管道安装并使用hugo_extended
映像,就像pages/hugo
.gitlab-ci.yml
一样。
image: registry.gitlab.com/pages/hugo/hugo_extended:latest
# Set this if you intend to use Git submodules
variables:
GIT_SUBMODULE_STRATEGY: recursive
HUGO_ENV: production
default:
before_script:
- apk add --update --no-cache git go
- git submodule update --init --recursive
- hugo mod init gitlab.com/pages/hugo
- hugo mod get -u github.com/theNewDynamic/gohugo-theme-ananke
test:
script:
- hugo
rules:
- if: $CI_COMMIT_REF_NAME != $CI_DEFAULT_BRANCH
pages:
script:
- hugo
artifacts:
paths:
- public
rules:
- if: $CI_COMMIT_REF_NAME == $CI_DEFAULT_BRANCH
这可能足以避免这个错误。
OP Chin-Erdene Gantulga在评论中补充道:
在docker中有这个图像冲突,所以我手动更改了
.gitlab-ci.yml
中的图像,从"latest
";版本到"hugo:0.91.0
"。
然后成功了。