`

Ubuntu Setup Gitlab and init

 
阅读更多
Supported: Ubuntu64位OS
https://blog.csdn.net/jinking01/article/details/84982754
https://www.jb51.net/article/194092.htm



GitLab 安装

第1步 - 安装依赖项

在我们自己安装GitLab之前,安装一些在安装过程中持续使用的软件非常重要。幸运的是,可以从Ubuntu的默认包存储库轻松安装所有必需的软件。

由于这是我们第一次apt在此会话期间使用,我们可以刷新本地包索引,然后键入以下内容来安装依赖项:

sudo apt update
sudo apt install ca-certificates curl openssh-server postfix


您可能已经安装了一些此软件。对于postfix的安装,请在出现提示时选择“ Internet站点”。在下一个屏幕上,输入服务器的域名以配置系统发送邮件的方式。
------------------------------------------------------------------------------

第2步 - 安装GitLab
cd /tmp
curl -LO https://packages.gitlab.com/install/repositories/gitlab/gitlab-ce/script.deb.sh


您可以随意检查下载的脚本,以确保您对所需的操作感到满意。您还可以在此处找到该脚本的托管版本:
less /tmp/script.deb.sh



一旦您对脚本的安全性感到满意,请运行安装程序:
sudo bash /tmp/script.deb.sh


该脚本将设置您的服务器以使用GitLab维护的存储库。这使您可以使用与其他系统软件包相同的软件包管理工具来管理GitLab。完成后,您可以使用以下apt命令安装实际的GitLab应用程序:
sudo apt install gitlab-ce



------------------------------------------------------------------------------
注意事项
在安装GitLab应用程序中如果报以下错误,我们可以配置国内加速镜像。

报错信息:
# apt-get install gitlab-ce
Reading package lists... Done
Building dependency tree
Reading state information... Done
E: Unable to locate package gitlab-ce



修改安装脚本
sudo vim /etc/apt/sources.list.d/gitlab_gitlab-ce.list


OLD
deb https://packages.gitlab.com/gitlab/gitlab-ce/ubuntu/ focal main
deb-src https://packages.gitlab.com/gitlab/gitlab-ce/ubuntu/ focal main


NEW
deb https://mirrors.tuna.tsinghua.edu.cn/gitlab-ce/ubuntu focal main
deb-src https://mirrors.tuna.tsinghua.edu.cn/gitlab-ce/ubuntu focal main


再次执行
sudo apt update
sudo apt install gitlab-ce


参考link
https://gitlab.com/gitlab-org/gitlab-foss/-/issues/2370

gitlab忘记密码

root@03cbecccf5c8:/# gitlab-rails console -e production

> user = User.where(username:"root").first
=> #<User id:1 @root>

> user.password = "qwer1234"
=> "qwer1234"

> user.save!
Enqueued ActionMailer::DeliveryJob (Job ID: 1f015e02-34bc-4b26-8e37-3101937b7ce1) to Sidekiq(mailers) with arguments: "DeviseMailer", "password_change", "deliver_now", #<GlobalID:0x00007fa6b83b1378 @uri=#<URI::GID gid://gitlab/User/1>>
=> true


https://www.jianshu.com/p/9ae417bdb969
分享到:
评论

相关推荐

Global site tag (gtag.js) - Google Analytics