不久前,我们已经从SVN切换到Git.
几天前,我意识到我们所有团队在推送时都会收到这些消息:
$ git push
Counting objects: 32, done.
Delta compression using up to 8 threads.
Compressing objects: 100% (19/19), done.
Writing objects: 100% (32/32), 2.94 KiB | 0 bytes/s, done.
Total 32 (delta 14), reused 0 (delta 0)
error: The last gc run reported the following. Please correct the root cause
and remove gc.log.
Automatic cleanup will not be performed until the file is removed.
warning: There are too many unreachable loose objects; run 'git prune' to remove them. …Run Code Online (Sandbox Code Playgroud) 当我尝试推送到我的 git lab 帐户时,我不断收到相同的消息:
“确保你在 git 中配置了你的 'user.email' 和 'user.name'”。
我已经做了
git config --global user.name "John Doe"
git config --global user.email "johndoe@email.com"
Run Code Online (Sandbox Code Playgroud)
我已经检查过
git remote -v
Run Code Online (Sandbox Code Playgroud)
有人对我还能做什么有任何想法吗?
我们gitlab在我们的办公室设置了一个设置,我们每周有大约100-150个项目在那里创建,而Admin希望保持创建回购和分配团队的控制权,对任何人来说似乎都有相当多的任务.每周创造许多回购.
有没有办法create repo on Gitlab using CLI- 我不介意我必须使用ssh它.
我有一个 jhipster 项目,几个月以来它用 gitlab 部署在 heroku 上
从昨天开始,我无法部署新版本,因为我有这个错误
FAILURE: Build failed with an exception.
32 * What went wrong:
33 A problem occurred configuring root project 'yvidya'.
34 > Could not resolve all artifacts for configuration ':classpath'.
35 > Could not resolve io.spring.gradle:propdeps-plugin:0.0.10.RELEASE.
36 Required by:
37 project :
38 > Could not resolve io.spring.gradle:propdeps-plugin:0.0.10.RELEASE.
39 > Could not get resource 'http://repo.spring.io/plugins- release/io/spring/gradle/propdeps-plugin/0.0.10.RELEASE/propdeps-plugin-0.0.10.RELEASE.pom'.
40 > Could not GET 'http://repo.spring.io/plugins-release/io/spring/gradle/propdeps-plugin/0.0.10.RELEASE/propdeps-plugin-0.0.10.RELEASE.pom'. Received status code 403 from server: Forbidden
Run Code Online (Sandbox Code Playgroud)
有谁知道为什么会出现这个错误?以及如何解决?
我对 Gitlab CI 管道workflow:rules和job:rules
workflow:
rules:
- if: '$CI_PIPELINE_SOURCE == "push"'
- if: '$CI_PIPELINE_SOURCE != "schedule"'
Run Code Online (Sandbox Code Playgroud)
和
test:
stage: test
image: image
script:
- echo "Hello world!"
rules:
- if: $CI_PIPELINE_SOURCE == "schedule"
Run Code Online (Sandbox Code Playgroud)
如果它们都在同一个 GitLab-ci YAML 文件中使用,会发生什么。
我设置了一个全新的CentOS 6.6安装,并将Omniubus安装程序用于Gitlab的CE.
运行gitlab-ctl reconfigure时出现以下错误:
================================================================================
Recipe Compile Error in /opt/gitlab/embedded/cookbooks/gitlab/recipes/default.rb
================================================================================
RuntimeError
------------
External URL must include a FQDN
Cookbook Trace:
---------------
/opt/gitlab/embedded/cookbooks/gitlab/libraries/gitlab.rb:95:in `parse_external_url'
/opt/gitlab/embedded/cookbooks/gitlab/libraries/gitlab.rb:191:in `generate_config'
/opt/gitlab/embedded/cookbooks/gitlab/recipes/default.rb:34:in `from_file'
Relevant File Content:
----------------------
/opt/gitlab/embedded/cookbooks/gitlab/libraries/gitlab.rb:
88:
89: def parse_external_url
90: return unless external_url
91:
92: uri = URI(external_url.to_s)
93:
94: unless uri.host
95>> raise "External URL must include a FQDN"
96: end
97: Gitlab['user']['git_user_email'] ||= "gitlab@#{uri.host}"
98: Gitlab['gitlab_rails']['gitlab_host'] = uri.host
99: Gitlab['gitlab_rails']['gitlab_email_from'] ||= "gitlab@#{uri.host}"
100:
101: case uri.scheme
102: when …Run Code Online (Sandbox Code Playgroud) 我想variables:在这里使用Gitlab CI文档中记录的关键字:
来自:https://docs.gitlab.com/ce/ci/yaml/README.html
变量
此功能需要gitlab-runner版本等于或大于0.5.0.
GitLab CI允许您添加在构建环境中设置的.gitlab-ci.yml变量.变量存储在存储库中,用于存储非敏感项目配置,即.RAILS_ENV或DATABASE_URL.
Run Code Online (Sandbox Code Playgroud)variables: DATABASE_URL: "postgres://postgres@postgres/my_database"这些变量稍后可用于所有已执行的命令和脚本.
YAML定义的变量也设置为所有创建的服务容器,从而允许对它们进行微调.
当我尝试使用它时,我的版本不会运行任何阶段,并且无论如何都标记为成功,这是一个糟糕的YAML的好兆头.我将gitlab-ci.yml内容粘贴到设置区域的LINT工具中,输出错误为:
状态:语法不正确
错误:变量作业:未知参数PACKAGE_NAME
我使用的YAML语法与文档相同,但是它不起作用.我无法找到任何与此相关的漏洞.以下是我当前的版本和我的gitlab-ci.yml的清理版本.
Gitlab版本:7.13.2 Omnibus
Gitlab Runner版本:0.5.2
gitlab-ci.yml(Sanitized)
types:
- test
- build
variables:
PACKAGE_NAME: "awesome-django-app"
PACKAGE_SUMMARY: "Awesome webapp backend."
MAJOR_RELEASE: "1"
MINOR_RELEASE: "0"
PATCH_LEVEL: "0dev"
DEV_DB_URL: "db"
DEV_SERVER: "pydev.example.com"
PROD_SERVER: "pyprod.example.com"
TEST_SERVER: "pytest.example.com"
envtest:
type: test
script:
- ". ./testbuild.sh"
tags:
- python2.7
- postgres
- linux
except:
- tags
buildrpm:
type: build
script:
- mkdir -p …Run Code Online (Sandbox Code Playgroud) 我正在尝试将我的GitLab存储库与IntelliJ-IDEA连接,但它仍然无法连接到repo.我尝试了下一件事:
我从这个链接做了很多事情:
和许多其他谷歌搜索
我不知道还有什么不起作用.
更新:当我尝试克隆存储库并按下测试按钮时,它会加载并加载,一段时间后没有任何反应它会给我这个错误:存储库测试失败
我有一个名为"www"的子目录,它是一个回购:
site
|-- www/
| |-- .git/
| |-- index.html
|-- design/
| |-- images.jpg
Run Code Online (Sandbox Code Playgroud)
我想将repo更改为父目录,以便repo结构镜像原始文件结构,如下所示:
site
|-- .git/
|-- www/
| |-- index.html
|-- design/
| |-- images.jpg
Run Code Online (Sandbox Code Playgroud)
可以这样做吗?那么将更改推向Gitlab会有什么影响吗?
我的管道中有一份工作,其中有一个包含两个非常重要步骤的脚本:
mvn test 对我的代码运行 JUnit 测试junit2html 将测试的 XML 结果转换为 HTML 格式(查看结果的唯一可能方法,因为我的管道不是通过 MR 完成的)作为工件上传到 GitLabdocker rm 销毁之前在管道中创建的容器我的问题是,当我的测试失败时,脚本会立即停止在mvn test,因此junit2html永远不会到达该步骤,这意味着在失败的情况下永远不会上传测试结果,也永远docker rm不会执行,因此容器仍然存在并弄乱了后续管道其结果。
我想要的是即使脚本在某些时候失败,也能够将工作持续到最后。基本上,该作业在 GitLab CI / CD 中仍应算作失败,但应执行其整个脚本。我该如何配置?