首页 > 解决方案 > 如何使用 gitlab-ci.yml 从自托管的 gitlab 存储库中提取

问题描述

我有一个在 docker windows 上运行的自托管 gitlab 实例,我已经设置了一个用于构建 gitlab-ci 的运行器。在我的 gitlab-ci.yml 文件中,我提到每次对 git 存储库进行提交时,运行器都应该从存储库中提取最新的源代码。我的 gitlab-ci 文件有以下几行:

git_pull:
    stage: build
    script:
        - echo 'creating a pull request'
        - cd "C:\Users\Haroon Gul\STM32CubeIDE\workspace_1.0.2\my-test-project"
        - git pull "http://localhost:9090/root/my-test-project.git"

每次运行此步骤时,我都会得到以下输出Logon failed, use ctrl+c to cancel basic credential prompt.

我在 Windows 上使用 shell runner。

标签: gitgitlabgitlab-cigitlab-ci-runner

解决方案


推荐阅读