我设置了一个 Windows GitLab 运行程序,它应该从我们的容器注册表下载 Docker 映像,然后在管道中运行构建脚本。不幸的是,由于以下错误,Docker 容器从未启动:
Running with gitlab-runner 15.1.0 (76984217)
on WindowsDockerRunner wZMWQZYi
Resolving secrets
Preparing the "docker-windows" executor
Using Docker executor with image mcr.microsoft.com/windows/servercore:ltsc2019 ...
Pulling docker image mcr.microsoft.com/windows/servercore:ltsc2019 ...
Using docker image sha256:e6b07227af5ca9303c2112b574f6f27f38135bbf9df29d829142410221967401 for mcr.microsoft.com/windows/servercore:ltsc2019 with digest mcr.microsoft.com/windows/servercore@sha256:26c6c296a4737ba478fe3c3e531b098f89b5562c40b416ba6fb8177ac462d1af ...
Preparing environment
Running on RUNNER-WZMWQZYI via
runner2...
ERROR: Job failed (system failure): prepare environment: Error response from daemon: invalid condition: "not-running". Check https://docs.gitlab.com/runner/shells/index.html#shell-profile-loading for more information
Run Code Online (Sandbox Code Playgroud)
错误消息没有明确说明问题的原因是什么,并且它引用的文档没有提及任何有关“条件”的内容。根据指向 shell 配置文件的链接,我怀疑它可能与正在运行的 shell 有关,但是当我在本地运行 Docker 容器时,它可以正常启动到 PowerShell。
有谁知道如何解决这个问题?
如何使用终端删除远程仓库?
我努力了rm -rf .git。
这会从本地删除文件,但不会从远程删除存储库。
我目前正在尝试构建我的 .gitlab-ci.yml 文件,如下所示:
为了避免将这些规则直接放入作业中(实际上大约有 30 个作业),我想在全球范围内重用这些规则。除了使用工作流程:规则之外,我找不到更好的方法。
workflow:
rules:
- if $CI_COMMIT_BRANCH == "develop"
variables:
RUN_A: "true"
- if $CI_COMMIT_BRANCH == "develop" && $CI_PIPELINE_SOURCE == "web"
variables:
RUN_B: "true"
job-a:
rules:
- if: $RUN_A == "true"
script:
- exit 0
job-b:
rules:
- if: $RUN_B == "true"
script:
- exit 0
Run Code Online (Sandbox Code Playgroud)
问题是,如果开发中有一个 Web 触发器,它不会将“RUN_B”设置为true。它只会有“RUN_A”和true. 我添加了另一项工作来打印变量只是为了确保:
test:
image: alpine
script:
- echo $RUN_A
- echo $RUN_B
Run Code Online (Sandbox Code Playgroud)
这只会打印trueRUN_A,但不会打印 RUN_B。我在 Gitlabs 文档中找不到任何说明它只会使用第一个匹配规则的内容。无论如何,有更好的方法来处理这个问题吗?我缺少什么?
org.eclipse.equinox.security.storage.StorageException: No password provided.
at org.eclipse.equinox.internal.security.storage.SecurePreferences.put(SecurePreferences.java:242)
at org.eclipse.equinox.internal.security.storage.SecurePreferencesWrapper.put(SecurePreferencesWrapper.java:128)
at org.eclipse.egit.core.securestorage.EGitSecureStore.putCredentials(EGitSecureStore.java:66)
at org.eclipse.egit.ui.internal.SecureStoreUtils.storeCredentials(SecureStoreUtils.java:39)
at org.eclipse.egit.ui.internal.credentials.LoginService.login(LoginService.java:39)
at
Run Code Online (Sandbox Code Playgroud)
我已经尝试从密钥库和 Windows 凭据中清除密码,并使用新的 gitlab 登录添加新密码。Pull 和 Push 工作正常,但密码仍未保存。
错误:获取远程存储库“来源”时出错
使用 jenkins 管道克隆 gitcode 时出现错误
我已上传example.conf在存储库安全文件中命名的文件,并希望在运行 CI / CD 管道脚本时下载该文件。我尝试遵循GitLab 文档中的项目级安全文件,但我仍然不明白该文件的正确路径应该是什么。
我的尝试是这样的:
curl --header "JOB-TOKEN: $CI_JOB_TOKEN" https://gitlab.com/${CI_PROJECT_NAMESPACE}/${CI_PROJECT_NAME}/download-secure-files/-/example.conf
当我得到回复时,这显然是不正确的:
<html><body>You are being <a href="https://gitlab.com/users/sign_in">redirected</a>.</body></html>
Run Code Online (Sandbox Code Playgroud)
即使我通过浏览器访问该文件,我也无法访问该文件,同时文档中提供的 URL 也有效。我不明白 URL 应该由什么组成,因为 usinghttps://gitlab.com/<GROUP NAME>/<PROJECT_NAME>/download-secure-files/-/<FILE NAME>不起作用。
那么,如何从 URL 访问 GitLab 安全文件呢?
我正在寻找在Windows PC上使用它设置一个gitlab服务器(使用linux机器)和几个开发人员.我基本上想知道这是否可能?我似乎无法找到明确的答案!
谢谢!
我成功安装了GitLab.
我想用用户名和密码创建一个用户,以便他可以从我的仓库中推送,从而无需任何SSH密钥.
我怎样才能做到这一点?谢谢!
我似乎无法弄清楚如何在Ubuntu 12.04上使用Gitlab的Omnibus安装上进行Github身份验证.
GitLab 7.5.1
GitLab Shell 2.2.0
GitLab API v3
Ruby 2.1.4p265
Rails 4.1.1
Run Code Online (Sandbox Code Playgroud)
这是我的/etc/gitlab/gitlab.rb样子,删除了个人详细信息.
external_url "http://git.domain.com"
gitlab_rails['gitlab_email_from'] = "git@domain.com"
gitlab_rails['gitlab_support_email'] = "sajan@domain.com"
gitlab_rails['omniauth_enabled'] = true
gitlab_rails['omniauth_allow_single_sign_on'] = true
gitlab_rails['omniauth_providers'] = [
{
"name" => "github",
"app_id" => "xxxxxxx",
"app_secret" => "xxxxxxxxxxx",
"args" => { scope: 'user:email' }
}
]
Run Code Online (Sandbox Code Playgroud)
在登录页面上,登录表单下方未提及Github或Github徽标.
我有一个分支,我正在尝试确认合并请求,但我得到以下消息:
"此存储库没有卫星.请让管理员解决此问题!"
这意味着什么,我该如何解决这个问题?