gitlab
gitlab实战
风云琪文
这个作者很懒,什么都没留下…
展开
-
Git 撤销单个文件修改
Git 撤销单个文件修改原创 2022-07-11 11:49:09 · 535 阅读 · 0 评论 -
向gitlab推送push时报nullSha1: contains entries pointing to null sha1
背景:有一个项目的源码是使用gitblit管理的,在迁移时在本地使用push推送到新的gitlab时报nullSha1: contains entries pointing to null sha1,具体报错信息如下:原因和解决思路:项目中存在包含指向null sha1的条目,需要找到这个异常条目所在的根文件夹,然后清理这些指向null sha1的项目解决步骤:1、找到指向null sha1的条目所属的异常对象的id,即上图中的af1768d1c48ed2117f31416a1a原创 2022-05-06 19:00:50 · 490 阅读 · 0 评论 -
gitlab从12.3.9升级为14.4.5版本后修改通用设置报错
1、如下图,gitlab从12版本升级到14版本后,使用gitlab管理员在设置目录中修改任何配置都会报错2、使用gitlab-ctl tail命令检查,后台日志报:如果后台日志报错有关键字:aes256_gcm_decrypt,则按这个链接的方法解决:gitlab迁移时备份恢复后报错aes256_gcm_decrypt_风云琪文的博客-CSDN博客如果报OpenSSL::Cipher::CipherError 但没有出现aes256_gcm_decrypt,如下:OpenSS.原创 2022-03-22 10:26:03 · 2125 阅读 · 1 评论 -
外部连接gitlab数据库postgresql
1、修改pg_hba.confvim /var/opt/gitlab/postgresql/data/pg_hba.conf修改为:host all all 0.0.0.0/0 trust注意:从此,不能再执行gitlab-ctl reconfigure 命令了,因为如果再执行gitlab-ctl reconfigure ,那么pg_hba.conf的修改就会被还原。2、gitlab的数据库默认有两个账号,都是不需要密码的,所以设置可远程访问gitlab只能是临时手段,用完要马上禁止。原创 2022-03-21 15:32:25 · 2457 阅读 · 0 评论 -
gitlab迁移时备份恢复后报错aes256_gcm_decrypt
详情查看:https://docs.gitlab.com/ee/raketasks/backup_restore.html#when-the-secrets-file-is-lost原因:迁移gitlab迁移时备份恢复后报aes256_gcm_decrypt是因为敏感数据的加密密钥发生变化或密钥丢失了,重置密钥修复数据即可。对于使用rpm方式安装的gitlab(版本大于等于14.1),按官方提示的具体操作注意,执行操作前备份gitlab以防万一gitlab-rake gitlab原创 2022-02-28 15:06:50 · 1159 阅读 · 0 评论 -
修改设置gitlab的外部访问地址和端口
切换到修改配置文件的目录cd /opt/gitlab/embedded/service/gitlab-rails/config备份配置文件cp gitlab.yml gitlab.yml.bak修改外部访问地址vi gitlab.yml注意:https设置为false,如果设置为ture要实施ssl证书重启gitlab服务gitlab-ctl restart...原创 2022-02-18 19:28:25 · 13599 阅读 · 2 评论 -
gitlab安装部署和运维常用的操作
关闭服务gitlab-ctl stop启动服务gitlab-ctl start查看状态gitlab-ctl status停止或重启gitlab的postgresql数据库gitlab-ctl stop postgresqlgitlab-ctl restart postgresql重启gitlab的redisgitlab-ctl stop redisgitlab-ctl restart redis重启gitlab的alertmanagergitlab-ctl stop al原创 2022-02-18 18:41:13 · 1130 阅读 · 0 评论 -
以rmp方式重装gitlab注意事项
使用rmp重新安装gitlab需要注意事项如下:一、使用rmp安装以后,在执行gitlab-ctl configure之前,需要先执行以下命令重启gitlab-runsvdir服务systemctl restart gitlab-runsvdir二、当执行gitlab-ctl configure之后出现ruby_block[supervise_xxxxxx_sleep] action run卡住不动时,例如ruby_block[supervise_redis_sleep] action ru原创 2022-02-18 17:43:49 · 400 阅读 · 0 评论 -
卸载删除gitlab
1、停止 gitlab服务gitlab-ctl stop2、卸载 gitlab(社区版)rpm -e gitlab-ce3、查看 gitlab 进程ps aux | grep gitlab4、杀掉gitlab service进程,该进程与runsvdir相关(带有好多............. 的进程)kill -9 xxxxxx其实就是强杀/opt/gitlab/service进程如果还不知道怎么杀,就重启服务器也行。5、删除所有包含 gitlab 的遗留文件find原创 2022-02-18 17:42:06 · 4476 阅读 · 0 评论 -
gitlab从78服务器迁移到70服务器
gitlab从78服务器迁移到70服务器前提条件是78服务器和70服务器的gitlab需要是相同的版本1、在78服务器执行以下指令,暂停gitlab外部服务gitlab-ctl stop unicorngitlab-ctl stop sidekiqgitlab-ctl stop nginx2、在78服务器备份,1分钟创建备份目录mkdir -p /opt/backup/gitlab0217_1/db执行备份指令,默认备份在/var/opt/gitlab/backupsgitla原创 2022-02-18 16:13:35 · 65 阅读 · 0 评论 -
gitlab从12.3.9升级为14.7.3
https://docs.gitlab.com/ee/update/index.html#upgrade-paths12.3.9 -> 12.10.14 -> 13.0.14 -> 13.12.15 -> 14.0.11设置使用官方YUM源,非必要步骤curl https://packages.gitlab.com/install/repositories/gitlab/gitlab-ce/script.rpm.sh | bash下载安装包wget https://mi原创 2022-02-18 12:43:25 · 2501 阅读 · 0 评论