gitlab

Gitlab and omniauth-pam Authentication

牧云@^-^@ 提交于 2019-12-13 17:26:49
问题 Basically I follow these instructions to add a custom omniauth provider: https://github.com/gitlabhq/gitlabhq/blob/master/doc/install/installation.md#using-custom-omniauth-providers I want to use omniauth-pam: https://github.com/nickcharlton/omniauth-pam After adding the gem and configuring this in gitlab.yml: providers: - { name: 'pam' } It does not start anymore with this error: Received wrong number of arguments. [nil, nil] (ArgumentError) /sync1/gitlab/vendor/bundle/ruby/2.0.0/gems

Password protect GitLab pages with htpasswd

纵然是瞬间 提交于 2019-12-13 17:06:31
问题 Is there a way to password protect a website published using GitLab pages? I tried adding an .htpasswd file to the root of the /pages directory, but that just makes the file available to everyone who goes to https://username.gitlab.io/mysite/.htpasswd. 回答1: See this answer to a very similar question. (Full disclosure, it was my question and answer). This gitlab repo shows a working example here. Uses static password protection and is also discussed in this issue. 回答2: GitLab now supports

gitlab实战:备份与恢复

前提是你 提交于 2019-12-13 14:26:30
文章目录 Backup Restore Backup   进入要备份的主机,执行备份操作命令。 [root@xtwj27 ~]# docker exec -t gitlab gitlab-backup create STRATEGY=copy 2019-12-12 02:44:13 +0000 -- Dumping database ... Dumping PostgreSQL database gitlabhq_production ... [DONE] 2019-12-12 02:44:16 +0000 -- done 2019-12-12 02:44:16 +0000 -- Dumping repositories ... * xtwj/doc/default (@hashed/4e/07/4e07408562bedb8b60ce05c1decfe3ad16b72230967de01f640b7e4729b49fce) ... [DONE] [DONE] Wiki * xtwj/sample/spring-cloud-alibaba-sample (@hashed/7a/61/7a61b53701befdae0eeeffaecc73f14e20b537bb0f8b91ad7c2936dc63562b25) ... [DONE] [SKIPPED] Wiki 2019-12

搭建私有代码管理平台(Gitlab)和自动化部署平台(Jenkins)

陌路散爱 提交于 2019-12-13 12:01:41
【推荐】2019 Java 开发者跳槽指南.pdf(吐血整理) >>> 项目本地开发完成后,我们就需要将代码部署到线上服务器。在当下微服务、集群等的流行,单靠传统的部署显然是无法满足当下的需求;但是我们通过Gitlab和Jenkins这两个常用的开源项目,便可搭建自己公司的代码管理工具和自动化部署平台。 一、Gitlab Gitlab 是基于 Ruby On Ralis 的一个开源版本管理系统,实现一个自托管的 Git 项目仓库。便于对公司的代码管理,我们可以在内网的服务器上搭建一套 Gitlab 系统。 Gitlab 可以通过官网 https://about.gitlab.com/downloads/ ,选择所需的服务器版本,然后根据提供的安装步骤进行安装,如下图所示: 安装好后可以通过提供的管理员账号进行登录,Gitlab 的使用方式(GitLab 中文社区版: https://gitlab.com/larryli/gitlab/ )和 Github 类似,我们可以为项目工程新建一个 git ,如下图所示: 一般来说,git 项目会分成 master 、develop 、feature、hotfix 这几种分支类型: mater 为主分支,主要用于发布,代码永远处于稳定可产品化发布的状态。 develop 为开发分支,主要记录开发状态下相对稳定的版本。 feature

介绍新的 GitLab 分支源插件

[亡魂溺海] 提交于 2019-12-13 12:01:21
【推荐】2019 Java 开发者跳槽指南.pdf(吐血整理) >>> 本文首发于: Jenkins 中文社区 原文链接 作者:baymac 译者:Donghui Wang 介绍新的 GitLab 分支源插件 新的 GitLab 分支源插件,允许您基于 GitLab 用户 或 组 或 子组 项目创建任务 GitLab 分支源插件已经走出 beta 阶段,并已发布到 Jenkins 更新中心。 它允许您基于 GitLab 用户 或 组 或 子组 项目创建任务。 您可以: 从 GitLab 用户/组/子组导入单个项目的分支作为任务(多分支流水线任务) 从 GitLab 用户/组/子组导入所有或部分项目的分支作为任务(GitLab 组任务或 GitLab 文件夹组织) GitLab 组项目对项目进行扫描, 根据设置的规则导入流水线任务。 导入项目之后, Jenkins 立即基于 Jenkinsfile 流水线脚本运行任务并且将状态通知到 GitLab 流水线状态。 这个插件与其他分支源插件不同,它提供了 GitLab 服务器配置,可以在系统配置中配置。 Jenkins 配置即代码 (JCasC) 也可以用于配置服务器。 要想了解更多关于服务器配置的信息,请参考我 之前的博客 。 要求 Jenkins - 2.176.2 (LTS) GitLab - v11.0+ 创建任务

remote: GitLab: You are not allowed to push code to protected branches on this project

浪子不回头ぞ 提交于 2019-12-13 11:56:43
问题 I am trying to push to master branch of a repo and I am failing to do so, since it is protected. I tried to look into the project settings and do not see any option for protected branches. The only option I could see is members. remote: GitLab: You are not allowed to push code to protected branches on this project. To git@gitlab.ins.risk.regn.net:cmd/release.git ! [remote rejected] master -> master (pre-receive hook declined) error: failed to push some refs to 'git@gitlab.ins.risk.regn.net

gitlab配置邮件通知功能操作记录

天大地大妈咪最大 提交于 2019-12-13 11:53:15
【推荐】2019 Java 开发者跳槽指南.pdf(吐血整理) >>> 之前已经介绍了gitlab的部署 http://www.cnblogs.com/kevingrace/p/5651402.html 但是没有配置邮箱通知功能,今天这里介绍下gitlab安装后的邮箱配置操作: 注意几点: 1)登陆gitlab后,只能在admin管理员账号下创建新账号,一般来说,创建好新账号后,会自动给新账号预留的邮箱发送通知邮件,点击邮件中的链接进行激活,首次登陆gitlab会进行密码设置。 2)如果不想在通知邮件里修改密码或没收到邮件,也可以绕过这一步。即在新账号创建后,在管理员状态下“编辑”新账号,设置一个密码,这个是初始密码。然后登陆新账号,这时候登陆后会强制进行初始密码的修改。 邮箱通知功能开通后,除了上面可以发送新建账号的激活邮件,还可以让用户通过邮箱注册gitlab,然后在管理员账号下对新注册账号进行project和group等权限授予。 这个有点不太安全,后续会介绍gitlab+openldap对接的操作记录,跟openldap结合后,gitlab的登陆就只能是LDAP方式了,邮箱注册功能就会失效! 废话不多说了,下面是gitlab开通邮箱通知功能的操作记录: 这里测试使用的是阿里云的企业邮箱 假设通知邮件的邮箱名为ops@wangshibo.cn,密码为zh@123bj

3分钟docker安装Gitlab

别来无恙 提交于 2019-12-13 11:52:56
【推荐】2019 Java 开发者跳槽指南.pdf(吐血整理) >>> 1、安装docker,这个没什么好说的.yum install docker 2、添加阿里云加速 首先需要注册一个 阿里云 的帐号,可能还需要其他一点信息。然后进入 容器Hub服务控制台 ,中间有一个加速器。我们点击它之后,阿里云会为我们创建一个专属加速器地址。 3、拉取gitlab docker pull gitlab/gitlab-ce:latest 4、启动docker docker run -d --hostname 服务器IP地址 -p 443:443 -p 80:80 -p 10022:22 --name gitlab --restart always -v /srv/gitlab/config:/etc/gitlab -v /srv/gitlab/logs:/var/log/gitlab -v /srv/gitlab/data:/var/opt/gitlab docker.io/gitlab/gitlab-ce 注:这个服务器IP地址记得使用外网地址. 5、gitlab配置 vim /srv/gitlab/config/gitlab.rb # 配置http协议所使用的访问地址 external_url 'http://服务器IP' # 配置ssh协议所使用的访问地址和端口 gitlab_rails

Change Gitlab CI Runner user

拟墨画扇 提交于 2019-12-13 11:32:39
问题 Currently when I start a build in GitlabCI it is running under gitlab-runner user. I want to change it the company's internal user. I didn't find any parameter to the /etc/gitlab-runner/config.toml which is solve that. My current configuration: concurrent = 1 [[runners]] name = "deploy" url = "" token = "" executor = "shell" 回答1: Running ps aux you can see: /usr/bin/gitlab-ci-multi-runner run --working-directory /home/gitlab-runner --config /etc/gitlab-runner/config.toml --service gitlab

CentOS7上搭建GitLib

十年热恋 提交于 2019-12-13 11:11:22
【推荐】2019 Java 开发者跳槽指南.pdf(吐血整理) >>> # 安装所需的软件包 sudo yum install -y curl policycoreutils-python openssh-server # 设置开机自启 sudo systemctl enable sshd sudo systemctl start sshd sudo firewall-cmd --permanent --add-service=http sudo firewall-cmd --permanent --add-service=https sudo systemctl reload firewalld # 或者关闭防火墙 iptables -F # 邮件服务 sudo yum install postfix sudo systemctl enable postfix sudo systemctl start postfix # 可能下载不下来,不过可以手动安装 curl https://packages.gitlab.com/install/repositories/gitlab/gitlab-ee/script.rpm.sh | sudo bash # 或者手动安装,gitlab下载地址: https://docs.gitlab.com/omnibus/manual_install