簡體   English   中英

Gitlab CI:git 拉動不能正常工作(無限循環)

[英]Gitlab CI : git pull don't work correctly (infinite loop)

Git pull 不能正常工作,我用 gitlab runner ci 得到一個無限循環(我在這里談論部署的最后一步)

我只需要在服務器中打開一個目錄並使用 gitlab ci 自動拉取 git

這個 my.gitlab-ci.yml 文件

test1:
  tags:
    - qdf
  stage: test
  script:
    - echo "Do a test here"

test2:
  tags:
    - qdf
  stage: test
  script:
    - echo "Do another parallel test here"

deploy1:
  tags:
    - qdf
  stage: deploy
  script:
    - echo "Start deploy"
    - cd D:/Git/Prod
    - echo "Next step"
    - git pull
    - echo "finish"

在此處輸入圖像描述

我做錯了什么以及我的 gitlab-ci 文件中缺少什么?

謝謝

這是一個身份驗證問題。

解決方案是在 git 拉之前使用 git 配置

git config remote.origin.url https://$(USER):$(PASS)@github.com/<UserNAME>/<Project>.git

暫無
暫無

聲明:本站的技術帖子網頁,遵循CC BY-SA 4.0協議,如果您需要轉載,請注明本站網址或者原文地址。任何問題請咨詢:yoyou2525@163.com.

 
粵ICP備18138465號  © 2020-2024 STACKOOM.COM