【问题标题】:Git push failing for GitlabCI RunnerGitlab CI Runner 的 Git 推送失败
【发布时间】:2016-10-28 18:48:32
【问题描述】:

我正在尝试实现 Git DMZ 工作流程:https://gist.github.com/djspiewak/9f2f91085607a4859a66

所以我正在尝试编写一个从 dmz 分支合并到我的主分支的作业。

这是我想出的:

dmz_merge:
    script: 
        - git checkout master
        - git pull
        - git merge origin/dmz --ff
        - git push origin master
    stage: deploy
    only:
        - dmz

但是当它运行时,我得到了这个失败:

Checking out 5f7dfe5b as dmz...

$ git checkout master

$ git pull

$ git merge origin/dmz --ff

Updating 005fbd1..5f7dfe5
Fast-forward
 .gitlab-ci.yml | 1 +
 1 file changed, 1 insertion(+)
$ git push origin master

remote: HTTP Basic: Access denied
fatal: Authentication failed for 'http://gitlab-ci-token:xxxxxxxxxxxxxxxxxxxx@gitlab.mydomain.com/group/project.git/'
ERROR: Build failed: exit status 128

看起来它甚至没有尝试使用我的 SSH 密钥,这是我预计会遇到麻烦的地方。我还需要做些什么来推动工作吗?我没有任何运气通过他们的文档。

【问题讨论】:

    标签: git gitlab-ci gitlab-ci-runner


    【解决方案1】:

    您需要通过 SSH 连接到您的存储库才能使用 SSH 密钥。现在您正在通过 HTTP 连接。

    【讨论】:

    猜你喜欢
    • 2017-02-28
    • 1970-01-01
    • 2017-01-28
    • 2017-05-07
    • 2016-08-24
    • 2020-09-09
    • 1970-01-01
    • 1970-01-01
    • 2021-11-07
    相关资源
    最近更新 更多