我目前正在DigitalOcean VPS上运行Gitlab实例 (v6.7.3) 和Ghost 驱动的个人博客,其大小为 512mb(最低端),由nginx 提供服务。直到最近我都无法同时运行,因为 Gitlab 无法启动,抱怨内存不足。我通过在 VPS (1GB) 上启用交换解决了这个问题(至少是暂时的)。主要问题似乎是 Gitlab 产生了 25 个(!)Sidekiq 实例,每个实例占用了我大约 30% 的内存,如. 我 在 SF 上发现了一个关于配置 Gitlab 以使用更少的 Sidekiq 工人的问题,但没有得到接受的答复。htop
我的问题是:以尽可能低的内存占用运行 Gitlab 的配置是什么?也许我无法减少那 25 个 Sidekiq 工人,但我可以做其他事情来减少其内存占用。
我的 VPS 仅供私人使用,我的 Gitlab 上有 5 或 6 个项目,预计一天最多提交 5 或 6 次,因此实际工作的最轻量级配置对我来说已经足够了。我的博客也很少点击。
我在 CentOS6.5 服务器上使用 GitLab Omnibus。
gitlab nginx 服务器监听 6543 端口(Apache 已经在使用 80 和 443)。
我想使用 Apache 作为反向代理来访问具有该地址的 GitLab: gitlab.example.com 而不是 example.com:6543
所以我添加了一个Apache Virtual Host,这里是配置:
<IfModule mod_ssl.c>
<VirtualHost *:443>
ServerAdmin admin@example.com
ServerName gitlab.example.com
ServerSignature Off
CustomLog /var/log/httpd/gitlab_access.log combined
ErrorLog /var/log/httpd/gitlab_error.log
ErrorLog syslog:local2
<IfModule mod_proxy.c>
ProxyVia On
ProxyRequests Off
ProxyPass / https://example.com:6543/
ProxyPassReverse / https://example.com:6543/
ProxyPreserveHost Off
<Proxy *>
Options FollowSymLinks MultiViews
AllowOverride All
Order allow,deny
allow from all
</Proxy>
</IfModule>
# SSL Config
SSLCertificateFile /etc/ssl/example.com/default.crt
SSLCertificateKeyFile /etc/ssl/example.com/default.key
SSLEngine on
SSLProtocol all …Run Code Online (Sandbox Code Playgroud) 最近我为我的局域网安装了 gitlab。当我的用户尝试创建他们的帐户时,他们会收到电子邮件确认消息。现在我的问题是我想禁用整个电子邮件确认功能和一切。为此,我必须在 gitlab 配置文件中配置什么文件,该怎么做?我必须更改哪些选项我在 ruby 方面很差,请详细解释。
当我使用时git clone https://my.example.com/gitlab/java/repository.git,我得到
克隆到“存储库”...
致命:无法访问“ https://my.example.com/gitlab/java/repository.git”:SSL证书问题:
无法获取本地颁发者证书
如果我设置的话效果很好git config --global http.sslVerify false
Gitlab 与 Apache2 和 SSL 一起使用,转发到 gitlab-workhorse。有关配置的更多详细信息:用于存储库克隆的 Gitlab HTTPS URI 不起作用 - SSL 主机无法验证 - 致命:无法访问
我尝试添加 SSL 证书,因为它们与 Apache 配置中的相同,但没有帮助:
nginx['ssl_certificate'] =“/etc/gitlab/ssl/my.example.com.crt”
nginx['ssl_certificate_key'] =“/etc/gitlab/ssl/my.example.com.key”
如何配置它以通过 HTTPS 进行 git 操作而不禁用验证?
我的公司正在评估 bitbucket 作为我们的中心 VCS。我们目前使用 gitlab 7.13.4。我们一直在寻找一种将我们所有 gitlab 存储库迁移到 bitbucket 的自动化方法,但我的搜索结果为空。有很多示例可以一次执行此操作,但无法一次性完成所有操作。对于数百个存储库,我们希望使用具有良好可靠性的流程。
作为奖励,有没有办法自动迁移组和权限?
我刚刚在运行 Apache 的 Centos7 vps 上安装了https://about.gitlab.com/installation/#centos。我应该在这样做之前阅读更多内容,因为它与 Apache 冲突,而且我不想要 EE 版本。我应该如何删除它?
curl https://packages.gitlab.com/install/repositories/gitlab/gitlab-ee/script.rpm.sh | sudo bash
sudo yum install gitlab-ee
sudo gitlab-ctl reconfigure
Run Code Online (Sandbox Code Playgroud)
我尝试了以下方法。
sudo gitlab-ctl stop
sudo gitlab-ctl uninstall
rpm -e gitlab
Run Code Online (Sandbox Code Playgroud)
重新启动后,我远未卸载
[michael@vps~]$ ps -ef | grep gitlab
root 730 1 0 13:49 ? 00:00:00 runsvdir -P /opt/gitlab/service log: ...........................................................................................................................................................................................................................................................................................................................................................................................................
root 743 730 0 13:49 ? 00:00:00 runsv gitlab-workhorse
root 750 730 0 13:49 ? 00:00:00 runsv gitlab-monitor
root 751 743 0 13:49 ? 00:00:00 svlogd -tt …Run Code Online (Sandbox Code Playgroud) 我正在尝试将我们的 Gitlab 存储库克隆到 Docker 容器中,并在运行 Ubuntu 18.04.1 的新虚拟机上运行。
Cloning into ${REPONAME}由于某种原因,当我尝试克隆存储库时,在我们最终开始枚举对象之前,我花了很长时间(几分钟)进行查看。
time git clone https://gitlab.com/gnutls/gnutls.git
Cloning into 'gnutls'...
remote: Enumerating objects: 178256, done.
remote: Counting objects: 100% (178256/178256), done.
remote: Compressing objects: 100% (50440/50440), done.
remote: Total 178256 (delta 128831), reused 173620 (delta 125853)
Receiving objects: 100% (178256/178256), 66.50 MiB | 10.14 MiB/s, done.
Resolving deltas: 100% (128831/128831), done.
real 5m 2.14s
user 0m 14.42s
sys 0m 4.39s
Run Code Online (Sandbox Code Playgroud)
我决定尝试克隆一个不同的存储库,google test该存储库托管在 Github 上,差异令人震惊。
time git clone https://github.com/google/googletest.git
Cloning …Run Code Online (Sandbox Code Playgroud) 编辑:事实证明这是一个 Gitlab 问题,但我仍然没有解决方案。
\n\n我的两个 AWS EC2 实例出现了奇怪的情况。它们在操作系统、区域和实例类型(均为 t3.micro)方面完全相同,设置方式也相同(但是,第一个是在几个月前设置的)。
\n\n两者都存在于 eu-central-1c 可用区中,并且都在同一个 git 存储库上运行。两者也都是最新的(CentOS 7.6.1810)。
\n\n较旧的服务器:
\n\n$ time git pull\nAlready up-to-date.\n\nreal 0m0.306s\nuser 0m0.034s\nsys 0m0.016s\nRun Code Online (Sandbox Code Playgroud)\n\n较新的服务器:
\n\n$ time git pull\nAlready up-to-date.\n\nreal 2m7.547s\nuser 0m0.026s\nsys 0m0.024s\nRun Code Online (Sandbox Code Playgroud)\n\n它也始终需要大约 2 分 7 秒。
\n\n还:
\n\n较旧的服务器:
\n\n--2019-04-09 10:52:03-- https://speed.hetzner.de/1GB.bin\nResolving speed.hetzner.de (speed.hetzner.de)... 88.198.248.254, 2a01:4f8:0:59ed::2\nConnecting to speed.hetzner.de (speed.hetzner.de)|88.198.248.254|:443... connected.\nHTTP request sent, awaiting response... 200 OK\nLength: 1048576000 (1000M) [application/octet-stream]\nSaving to: \xe2\x80\x981GB.bin\xe2\x80\x99\n\n100%[===============================================================>] 1,048,576,000 121MB/s in 6.5s \n\n2019-04-09 10:52:10 (154 MB/s) - …Run Code Online (Sandbox Code Playgroud) 现在,我的 ubuntu 服务器上运行着 gitlab 和 gitolite。但是,这台服务器太慢了,我的公司希望将服务器移到另一台机器上。有没有办法将 gitlab 和 gitolite 服务器(整个文件、用户和设置)移动到另一台机器上?
再次安装和创建所有用户和存储库将是我的最后选择。先感谢您。
运行“sudo apt update”时出现以下错误:
user@gitlab:~$ sudo apt update
Hit:1 http://security.debian.org/debian-security stretch/updates InRelease
Ign:2 http://ftp.fi.debian.org/debian stretch InRelease
Hit:3 http://ftp.fi.debian.org/debian stretch-updates InRelease
Hit:4 http://ftp.fi.debian.org/debian stretch Release
Get:6 https://packages.gitlab.com/gitlab/gitlab-ee/debian stretch InRelease [23.3 kB]
Err:6 https://packages.gitlab.com/gitlab/gitlab-ee/debian stretch InRelease
The following signatures couldn't be verified because the public key is not available: NO_PUBKEY 3F01618A51312F3F
Fetched 23.3 kB in 2s (11.0 kB/s)
Reading package lists... Done
Building dependency tree
Reading state information... Done
All packages are up to date.
W: An error occurred during the signature verification. …Run Code Online (Sandbox Code Playgroud) gitlab ×10
git ×5
amazon-ec2 ×1
apache-2.2 ×1
apache-2.4 ×1
apt ×1
bitbucket ×1
centos7 ×1
debian ×1
docker ×1
eclipse ×1
gitolite ×1
memory-usage ×1
migration ×1
nginx ×1
ssl ×1
ubuntu ×1
uninstall ×1