【问题标题】:Gitlab CI : git pull don't work correctly (infinite loop)Gitlab CI:git pull 无法正常工作(无限循环)
【发布时间】:2020-11-18 02:41:55
【问题描述】:

Git pull 不能正常工作,我的 gitlab runner ci 出现了无限循环 (我这里说的是部署的最后一步)

我只需要在服务器中打开一个目录并使用 gitlab ci 自动进行 git pull

这是我的 .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 github gitlab gitlab-ci


    【解决方案1】:

    这是一个身份验证问题。

    解决方法是在 git pull 之前使用一个 git config

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

    【讨论】:

      猜你喜欢
      • 2016-05-09
      • 2019-01-01
      • 2014-12-02
      • 2013-08-09
      • 2013-10-30
      • 2013-10-19
      相关资源
      最近更新 更多