gpt4 book ai didi

gitlab runner 请求的URL返回错误: 403

转载 作者:IT王子 更新时间:2023-10-29 00:45:34 29 4
gpt4 key购买 nike

我目前正在使用 gitlab.com(不是本地安装)和他们的 multi-runner 进行 CI 集成。这对我的一个项目非常有效,但对另一个项目却失败了。

我的主机使用 2012R2,MSBuild 版本为 14.0.23107.0。我知道下面的错误显示 403,这是一条访问被拒绝的消息。我的问题是找到要更改的权限设置。

错误信息:

Running with gitlab-ci-multi-runner 1.5.3 (fb49c47) Using Shell executor... Running on WIN-E0ORPCQUFHS...

Fetching changes...

HEAD is now at 6a70d96 update runner file remote: Access denied fatal: unable to access 'https://gitlab-ci-token:xxxxxxxxxxxxxxxxxxxx@gitlab.com/##REDACTED##/ADInactiveObjectCleanup.git/': The requested URL returned error: 403 Checking out 60ea1410 as Production...

fatal: reference is not a tree: 60ea1410dd7586f6ed9535d058f07c5bea2ba9c7 ERROR: Build failed: exit status 128

gitlab-ci.yml 文件:

variables:
Solution: ADInactiveObjectCleanup.sln

before_script:
#- "echo off"
#- 'call "%VS120COMNTOOLS%\vsvars32.bat"'
## output environment variables (usefull for debugging, propably not what you want to do if your ci server is public)
#- echo.
#- set
#- echo.

stages:
- build
#- test
#- deploy

build:
stage: build
script:
- echo building...
- '"%ProgramFiles(x86)%\MSBuild\14.0\Bin\msbuild.exe" "%Solution%" /p:Configuration=Release'
except:
#- tags

最佳答案

要解决此问题,我必须将自己添加为项目成员。这是一个私有(private) repo 。我不确定这是否导致运行者因不同的权限设置而失败,但很有可能。

这个帮助article在 gitlab 概述了这个问题。

With the new permission model in place, there may be times that your build will fail. This is most likely because your project tries to access other project's sources, and you don't have the appropriate permissions. In the build log look for information about 403 or forbidden access messages.

As an Administrator, you can verify that the user is a member of the group or project they're trying to have access to, and you can impersonate the user to retry the failing build in order to verify that everything is correct.

在项目页面中单击设置齿轮,然后单击成员。将您自己(或用户生成的构建)添加为项目的成员。我使用了“Master”角色,但基于 this document您至少可以使用“记者”角色。报告者角色是仍然可以访问“pull 项目代码”的最低权限。这消除了我的 403 错误并允许我继续。

关于gitlab runner 请求的URL返回错误: 403,我们在Stack Overflow上找到一个类似的问题: https://stackoverflow.com/questions/40006690/

29 4 0
Copyright 2021 - 2024 cfsdn All Rights Reserved 蜀ICP备2022000587号
广告合作:1813099741@qq.com 6ren.com