参考连接:
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变量中。