gitlab

GitLab: Is the backup rake task atomic?

夙愿已清 提交于 2020-01-01 09:35:31
问题 If I make a GitLab backup using the gitlab:backup:create rake task just as someone is pushing to the repositories, will the backup process be affected? Is it necessary to shutdown GitLab before doing the backup? 回答1: The task gitlab/backup.rake itself doesn't look atomic. It calls: Rake::Task["gitlab:backup:db:create"].invoke Rake::Task["gitlab:backup:repo:create"].invoke That uses the gem activerecord: puts "Dumping database tables ... ".blue ActiveRecord::Base.connection.tables.each do |tbl

How do I add a .env file in gitlab ci during deployment stage?

社会主义新天地 提交于 2020-01-01 04:47:22
问题 So I have a react/typescript app in my repo that I'm working on and in my repo I have a .env file that I'm ignoring so that my secrets don't get exposed and a .env-example file of important environment variables to configure. My problem is, since I'm not pushing the .env file to my repo, when I deploy my app through the google app engine (this is done in the deployment stage in my gitlab-ci.yml file), these environment variables will not be present in production and I need them for my app to

How to access source code files and list directories using GitLab API?

百般思念 提交于 2020-01-01 01:14:26
问题 I am using GitLab and I completed setup as described in Gitlab installation instructions, I am now trying to access its RestFul API to perform tasks like create/delete Projects or Users(I am able to do this successfully). I now have to list out all the directories within the master branch (or any other branch the project has) and want to access source code files listed in those directories(e.g. myproject->master->api, src->somefile.java etc), is it possible to do something like that using the

direct access to to gitlab database

一世执手 提交于 2019-12-31 08:39:29
问题 I am running the AWS AMI from gitlab. I am trying to access the postgres database directly using psql. I thought I could just use the credentials in database.yml, since the rails application is working fine: /opt/gitlab/embedded/bin/psql -U gitlab -d gitlabhq_production But I get: psql: FATAL: Peer authentication failed for user "gitlab" How can the rails app be connecting to the database while psql cannot? 回答1: sudo -u gitlab-psql /opt/gitlab/embedded/bin/psql -h /var/opt/gitlab/postgresql/

gitlab添加公钥

纵然是瞬间 提交于 2019-12-30 16:29:06
【推荐】2019 Java 开发者跳槽指南.pdf(吐血整理) >>> 1、cd ~/.ssh 2、ls,假如本地公钥生成,会出现3个文件 id_rsa id_rsa.pub known_hosts 3、cat id_rsa.pub查看公钥 4、在gitlab添加自己的公钥 来源: oschina 链接: https://my.oschina.net/u/3073352/blog/3150921

see diff of commit on submodule in gitlab

余生长醉 提交于 2019-12-30 14:08:32
问题 I have a gitlab version 7.3 that is working totally fine when I work with normal repositories. However, I added a github submodule inside my gitlab project. On my repo, I did after commit and push ( git push --recurse-submodules=check ) and it worked perfectly. But now, I can see my commit on gitlab, but the diff isnt displayed when I browse it on my gitlab with chrome. All the commits on files outside the submodules are well displayed meanwhile. Is that a known issue? Do I have something to

Git “git config --global user.name” why does this option exist?

烂漫一生 提交于 2019-12-30 10:51:04
问题 Git Beginner Alert! I have a basic question as to WHY does GIT allow one to change the user name as a config option git config --global user.name trojan Doesn't this option up the gate for committers to impersonate and create confusion in the history/logs? Why isn't it as simple as take the username from the credentials that are used to connect with GIT? 回答1: As Greg notes in a comment, that can only work in a pure-push workflow. There are many others, including pure-pull, email, git bundle ,

Gitlab的安装及项目新建

允我心安 提交于 2019-12-30 06:32:57
1. Gitlab的安装及仓库创建 1.1下载gitlab安装包 1).官网下载速度较慢 建议先行下载 国内的源里面可以找到最新的版本https://mirrors.tuna.tsinghua.edu.cn/gitlab-ce/ubuntu/pool/trusty/main/g/gitlab-ce/ 2).安装依赖 sudo apt-get install curl openssh-server ca-certificates postfix 3).配置postfix邮箱 选择 Internet Site (F12) Enter 下一步 这里设置FQDN 使用默认即可. 1.2安装gitlab 在终端执行:sudo dpkg -i gitlab-ce_9.5.4ce.0_amd64.deb 进行安装。 出现 It looks like… 表示安装成功! 1.3 安装Git工具 1.4 生成密钥文件 使用ssh-keygen生成密钥文件.ssh/id_rsa.pub 这里生成的两个秘钥很重要,会在后面gitlab的仓库配置与Jenkins的构建免密连接时候用到。 2 GitLab 简单配置及项目新建 2.1 配置 gitlab 这一步在官方的文档里面没有,但是如果没有配置的话,直接启动GitLab,会出现不正确的FQDN错误,导致无法正常启动。因此必须做配置。 sudo gedit

Gitlab的安装及项目新建

為{幸葍}努か 提交于 2019-12-30 06:32:21
1. Gitlab的安装及仓库创建 1.1下载gitlab安装包 1).官网下载速度较慢 建议先行下载 国内的源里面可以找到最新的版本https://mirrors.tuna.tsinghua.edu.cn/gitlab-ce/ubuntu/pool/trusty/main/g/gitlab-ce/ 2).安装依赖 sudo apt-get install curl openssh-server ca-certificates postfix 3).配置postfix邮箱 选择 Internet Site (F12) Enter 下一步 这里设置FQDN 使用默认即可. 1.2安装gitlab 在终端执行:sudo dpkg -i gitlab-ce_9.5.4ce.0_amd64.deb 进行安装。 出现 It looks like… 表示安装成功! 1.3 安装Git工具 1.4 生成密钥文件 使用ssh-keygen生成密钥文件.ssh/id_rsa.pub 这里生成的两个秘钥很重要,会在后面gitlab的仓库配置与Jenkins的构建免密连接时候用到。 2 GitLab 简单配置及项目新建 2.1 配置 gitlab 这一步在官方的文档里面没有,但是如果没有配置的话,直接启动GitLab,会出现不正确的FQDN错误,导致无法正常启动。因此必须做配置。 sudo gedit

How to integrate Sonar Quality Gates with Gitlab-CI

不羁岁月 提交于 2019-12-30 03:42:07
问题 I have a gitlab-ci integration that require a sonar analysis and if the quality gates pass, to build a docker image. Is this possible using gitlab-ci ? 回答1: To break the CI build for a failed Quality Gate, 1.Search in /report-task.txt the values of the CE Task URL (ceTaskUrl) and CE Task Id (ceTaskId) 2.Call /api/ce/task?id=XXX where XXX is the CE Task Id retrieved from step 1 Ex:- https:///api/ce/task?id=Your ceTaskId 3.Wait for sometime until the status is SUCCESS, CANCELED or FAILED from