离线安装 gitlab

参考连接:

https://www.cnblogs.com/yyee/p/13060076.html

https://segmentfault.com/a/1190000021278114

https://www.cnblogs.com/schblog/p/13270178.html

gitlab-ctl start
gitlab-ctl stop
gitlab-ctl restart

gitlab-ctl status

说几个安装过程遇到的问题:

1.  默认端口号冲突  80 或8080  被用了 ,需要改一下,改的时候注意unicone也要改

其他:https://blog.csdn.net/qq_31307269/article/details/78728628

常见问题

3.1 Error executing action

在执行配置命令“sudo gitlab-ctl reconfigure”过程中出现“Error executing action `create` on resource 'user[git]'”的错误,是因为系统中在配置gitlab时已经存在git用户,git用户的一些配置和gitlab要求的不符,最简单的解决方式是删除git用户,重新执行配置命令,如下所示:

userdel git

sudo gitlab-ctl reconfigure

3.2 URI::InvalidURIError

在执行配置命令“sudo gitlab-ctl reconfigure”过程中出现下列错误:

Recipe Compile Error in /opt/gitlab/embedded/cookbooks/gitlab/recipes/default.rb

================================================================================

URI::InvalidURIError

--------------------

bad URI(is not URI?): ${external_url}

Cookbook Trace:

---------------

  /opt/gitlab/embedded/cookbooks/gitlab/libraries/gitlab.rb:92: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'

是因为/etc/gitlab/gitlab.rb文件中的内容是:

external_url 'hostname1'

将其修改为:

external_url='hostname1'

即可,只需要在原来的配置项中添加个等号即可,为了避免域名引起的问题,也可以直接配置ip,如下所示:

external_url='192.168.1.49'。

3.3 command not found

在使用git push命令过程中出现下列错误:

sh:git-receive-pack:command not found

sh:git-upload-pack:command not found

是因为安装gitlab的centos7上没有安装git或者没有将git的执行文件添加到PATH变量中。

  • 0
    点赞
  • 0
    收藏
    觉得还不错? 一键收藏
  • 打赏
    打赏
  • 0
    评论

“相关推荐”对你有帮助么?

  • 非常没帮助
  • 没帮助
  • 一般
  • 有帮助
  • 非常有帮助
提交
评论
添加红包

请填写红包祝福语或标题

红包个数最小为10个

红包金额最低5元

当前余额3.43前往充值 >
需支付:10.00
成就一亿技术人!
领取后你会自动成为博主和红包主的粉丝 规则
hope_wisdom
发出的红包

打赏作者

小金子的夏天

你的鼓励将是我创作的最大动力

¥1 ¥2 ¥4 ¥6 ¥10 ¥20
扫码支付:¥1
获取中
扫码支付

您的余额不足,请更换扫码支付或充值

打赏作者

实付
使用余额支付
点击重新获取
扫码支付
钱包余额 0

抵扣说明:

1.余额是钱包充值的虚拟货币,按照1:1的比例进行支付金额的抵扣。
2.余额无法直接购买下载,可以购买VIP、付费专栏及课程。

余额充值