我的配置文件:
external_url "http://192.168.3.23" # note the use of a dotted ip
gitlab_rails['gitlab_email_enabled'] = true
gitlab_rails['gitlab_email_from'] = 'gitlab@myhome.com'
gitlab_rails['gitlab_email_display_name'] = 'gitlab'
#gitlab_rails['gitlab_email_reply_to'] = 'gitlab@myhome.com'
gitlab_rails['smtp_enable'] = true
gitlab_rails['smtp_address'] = "mail.home"
gitlab_rails['smtp_port'] = 25
gitlab_rails['smtp_domain'] = "myhome.com"
mattermost_external_url 'http://192.168.3.23'
mattermost['gitlab_enable'] = true
mattermost['gitlab_secret'] = "4d1e<***>bdbfe"
mattermost['gitlab_id'] = "1c441<***>092df"
mattermost['gitlab_scope'] = ""
mattermost['gitlab_auth_endpoint'] = "http://192.168.3.23/oauth/authorize"
mattermost['gitlab_token_endpoint'] = "http://192.168.3.23/oauth/token"
mattermost['gitlab_user_api_endpoint'] = "http://192.168.3.23/api/v3/user"
# Shut down GitLab services on the Mattermost server
#gitlab_rails['enable'] = false
Run Code Online (Sandbox Code Playgroud)
但是现在通过地址192.168.3.23加载只有gitlab。
GitLab Community Edition 8.4.4 9c31cc6!如何开始使用 gitlab …
我的公司有一个主代码库和几个相同代码库的实例,即在AWS和mysql数据库上运行的company.com/instance1,company.com/instance2,company.com/instance3等.
我认为如果我们在AWS上安装gitlab会有所帮助,因为它可以简化我们的整体开发过程.这是一个好主意吗 ?.
我很困惑,我们是否必须在AWS上安装centOS来安装gitlab,或者gitlab是否可以在没有centos的AWS上运行.
我很困惑,因为在我当地的centos系统我已经在本地安装了gitlab,我在设置URL方面遇到了麻烦.
用户需要键入company.com/instance以获取所需内容,并且已经有人开始在AWS上使用它.
可能我已经做了CI并在AWS上部署代码?这是如何运作的?
gitlab在LAMP环境中是否可以在已有的AWS服务器实例上正常运行?如何去做同样的事情?
我正在尝试配置现有的NGINX以在CentOS上使用Gitlab omnibus.我目前安装了另一个使用127.0.0.1:3838的应用程序(App A).到目前为止,我有NGINX设置,以便进入我的网站IP 12.345.678.910,我能够重定向到App A.我想设置Gitlab,以便当我转到12.345.678.910/gitlab时,它将我重定向到Gitlab.我的想法是在http://127.0.0.1:8081上运行Gitlab ,并让NGINX将12.345.678.910/gitlab重定向到localhost:8081.
我已按照这些链接寻求帮助:
https://docs.gitlab.com/omnibus/settings/nginx.html#using-a-non-bundled-web-server.
编辑/etc/gitlab/gitlab.rb
external_url = 'http://127.0.0.1:8081'
nginx['enable'] = false
web_server['external_users'] = ['nginx']
Run Code Online (Sandbox Code Playgroud)
新配置文件/ etc/nginx/sites-enabled/gitlab
upstream gitlab-workhorse {
server unix:/var/opt/gitlab/gitlab-workhorse/socket;
}
server {
listen 0.0.0.0:8081;
listen [::]:8081;
server_name localhost;
server_tokens off;
root /opt/gitlab/embedded/service/gitlab-rails/public;
access_log /var/log/nginx/gitlab_access.log;
error_log /var/log/nginx/gitlab_error.log;
location / {
client_max_body_size 0;
gzip off;
proxy_read_timeout 300;
proxy_connect_timeout 300;
proxy_redirect off;
proxy_http_version 1.1;
proxy_set_header Host $http_host;
proxy_set_header X-Real-IP $remote_addr;
proxy_set_header X-Forwarded-For $proxy_add_x_forwarded_for;
proxy_set_header X-Forwarded-Proto $scheme;
proxy_pass http://gitlab-workhorse;
}
}
Run Code Online (Sandbox Code Playgroud)
添加到/etc/nginx/conf.d/default.conf:
server { …Run Code Online (Sandbox Code Playgroud) 我已经从备份中还原了Gitlab,现在每次尝试访问该runners网页时,我都会收到内部服务器错误。
我尝试卸载所有配置的gitlab-runners并访问它,问题仍然存在。这是gitlab-rails / production.log中的跟踪:
Started GET "/admin/runners" for 127.0.0.1 at 2019-01-16 07:17:12 -0500
Processing by Admin::RunnersController#index as HTML
Completed 500 Internal Server Error in 66ms (ActiveRecord: 5.7ms)
ActionView::Template::Error ():
37:
38: .col-sm-6
39: .bs-callout
40: = render partial: 'ci/runner/how_to_setup_runner',
41: locals: { registration_token: Gitlab::CurrentSettings.runners_registration_token,
42: type: 'shared',
43: reset_token_url: reset_registration_token_admin_application_settings_path }
lib/gitlab/crypto_helper.rb:27:in `aes256_gcm_decrypt'
app/models/concerns/token_authenticatable_strategies/encrypted.rb:55:in `get_token'
app/models/concerns/token_authenticatable_strategies/base.rb:33:in `ensure_token!'
app/models/concerns/token_authenticatable.rb:43:in `block in add_authentication_token_field'
app/models/application_setting.rb:409:in `runners_registration_token'
lib/gitlab/current_settings.rb:19:in `method_missing'
app/views/admin/runners/index.html.haml:40:in `_app_views_admin_runners_index_html_haml___977288809002382166_69944849285200'
app/controllers/application_controller.rb:116:in `render'
lib/gitlab/i18n.rb:55:in `with_locale'
lib/gitlab/i18n.rb:61:in `with_user_locale'
app/controllers/application_controller.rb:420:in `set_locale'
lib/gitlab/middleware/multipart.rb:103:in `call'
lib/gitlab/request_profiler/middleware.rb:16:in …Run Code Online (Sandbox Code Playgroud) 我最近在本地网络的服务器中安装了带有 Docker 的 GitLab。我正在尝试迁移我在 PC 中本地维护的存储库。我通过本地网络中的本地 HTTP 服务器公开它作为解决方法,只是为了能够将其导入 GitLab,因为 GitLab 管理面板中几乎所有可用的选项都类似于“从 GitHub 导入”,这些选项都没有帮助在我的情况下(我的意思是:我不能只上传我的存储库.git文件夹来导入它吗? -retorically 说)顺便说一句,我选择的是“通过 URL 存储”:
我不得不禁用一个安全设置,因为 GitLab 不允许从指向本地网络中服务器的 URL 导入。因此,我在出站服务部分打开了名为“允许从钩子和服务向本地网络发出请求”的选项。
然后,我尝试从 GitLab 创建一个新项目,使用名为“导入项目”的选项卡并在其中填写表单。然后,它会持续运行很长时间,并显示“正在导入...”消息,看起来它一直在一遍又一遍地重试,直到显示此消息:
每次导入尝试都失败:将存储库http://111.222.33.44/path/to/my/repository/root/folder/.git导入 myuser/my_project 时出错- 13:CreateRepositoryFromURL: clone cmd wait: exit status 128. 请尝试再次。
我一直在阅读在线发布的 Gitlab 手册,关于 GitLab 的不同文章,搜索有关此错误的信息并发现了数十张具有类似(但非常不同!)问题的票......但我仍然不明白:为什么我不能立即上传我的存储库?
给定的 URL本身不是问题:如果我在网络浏览器中输入它,我可以在网络浏览器中清楚地看到我项目的整个文件系统,如果我添加/.git到它,我什至可以看到隐藏.git文件夹的内容在我的浏览器中......但是,出于某种原因,这对于 GitLab 来说还不够......
我对此感到非常困惑。我找到的链接之一是将存储库从 Gitlab 服务器导出到另一台 Gitlab 服务器(请注意,我不是从其他 Gitlab 导入的,而是在 PC 中创建的一个简单的 git 存储库,使用简单的 .findinggit init阅读材料远程类似于我的案例不是小菜一碟:我一整天都在寻找这个问题,但没有成功......)。在该链接中,有一部分内容是:
您将收到克隆空存储库的警告。这是正常的。切换到已签出存储库的工作目录并执行 git pull
...所以我找到了我的 GitLab 安装创建“空存储库”的文件夹,并尝试 …
我在 Kubernetes 集群上运行 GitLab。
我有一个包含所有综合配置的 ConfigMap。ConfigMap 安装到环境变量 GITLAB_OMNIBUS_CONFIG。
这会暴露敏感配置,例如源代码中的密码。
我想创建 Secrets 并将它们安装为附加环境变量,并从附加环境变量中读取综合配置,如下例所示。
gitlab_rails['smtp_enable'] = true
gitlab_rails['smtp_address'] = "mail.hostedemail.com"
gitlab_rails['smtp_port'] = 465
gitlab_rails['smtp_user_name'] = "username@domain.com"
gitlab_rails['smtp_password'] = $SMTP_PASSWORD
gitlab_rails['smtp_domain'] = "domain.com"
etc...
Run Code Online (Sandbox Code Playgroud) 我一直在努力让这一天整理好.我正在使用现有的nginx安装在Ubuntu 14.04上运行GitLab的omnibus安装.我可以登录,创建项目,问题等,但我不能从外部推送/拉动,克隆或任何东西(不是通过web gui).一个问题......我在这台服务器上运行Plesk 12.5.这是一些输出:
nginx报告错误:
2016/02/10 16:00:50 [crit] 24866#0: *53 connect() to unix://var/opt/gitlab/gitlab-workhorse/socket
failed (13: Permission denied) while connecting to upstream, client: XXX.XXX.X.X,
server: git.example.com,
request: "GET /namespace/project-name.git/info/refs?service=git-upload-pack HTTP/1.1",
upstream: "http://unix://var/opt/gitlab/gitlab-workhorse/socket:/namespace/project-name.git/info/refs?service=git-upload-pack", host: "git.example.com"
Run Code Online (Sandbox Code Playgroud)
主力套接字的权限:
srwxrwxrwx 1 git git 0 Feb 2 18:40 socket
我试图将所有者更改为nginx(www-data),并将组更改为gitlab-www,但没有运气.我没有使用任何不同的目录....只是不知道从哪里去.我已经非常接近这个运行但感觉到目前为止!
Gitlab:检查(是的,IMAP设置中有错误,但我不认为这是相关的???)
Checking GitLab Shell ...
GitLab Shell version >= 2.6.10 ? ... OK (2.6.10)
Repo base directory exists? ... yes
Repo base directory is a symlink? ... no
Repo base owned by git:git? ... …Run Code Online (Sandbox Code Playgroud) 我一直在努力解决一个我仍然无法解决的问题.非常感谢帮助!我做了什么:1)在http://docs.gitlab.com/omnibus/docker/上的服务器上的Ubuntu 16.04.1 LTS虚拟机上使用docker镜像(8.9.6-ce.0)安装Gitlab-CE README.html 2)在本地设置用户并为同一局域网中的机器推送一些项目>>所有工作正常3)向我的防火墙添加新映射以映射gitlab-machine-ip:80> example.org:8138 so我可以用http访问gitlab
我现在可以访问http://example.org:8138上的Web界面并使用它现在问题:克隆项目的URL显示不正确,因为它们错过了:8138端口(它们得到example.org部分)从--host设置传递到docker容器).如果我手动将自定义端口添加到URL,克隆工作正常
我想解决这个问题,所以尝试将gitlab.rb中的external_url设置设置为:external_url'http://example.org:8138 '并重新启动(也尝试手动调用gitlab-ctl configure)
状态是我无法访问网页界面http://example.org:8138在浏览器中获取ERR_CONNECTION_REFUSED如果我只是注释掉external_url设置,一切都恢复正常工作(除了URL中缺少的端口)
我已经阅读了一堆问题报告,但没有一个帮助解决问题:https: //gitlab.com/gitlab-org/omnibus-gitlab/issues/244 >>(我不使用外部NGINX)在我读到这篇文章后,我也尝试更新到8.11:https://gitlab.com/gitlab-org/gitlab-ce/issues/20131但它没有帮助
真的不知道这里发生了什么.输出gitlab-rake gitlab:env:info和gitlab-rake gitlab:检查如下
System information
System:
Current User: git
Using RVM: no
Ruby Version: 2.3.1p112
Gem Version: 2.6.6
Bundler Version:2.3.0
Rake Version: 10.5.0
Sidekiq Version:4.1.4
GitLab information
Version: 8.11.3
Revision: 6cd4edb
Directory: /opt/gitlab/embedded/service/gitlab-rails
DB Adapter: postgresql
URL: http://example.org:8138
HTTP Clone URL: http://example.org:8138/some-group/some-project.git
SSH Clone URL: git@example.org:some-group/some-project.git
Using LDAP: no
Using Omniauth: …Run Code Online (Sandbox Code Playgroud) 我正在尝试使用 ansible 完全部署我的 gitlab CICD 堆栈并自动注册运行程序。
我在我的剧本中使用以下任务来获取注册令牌并将其存储在事实中以供我的跑步者进一步注册,正如我在几个教程中看到的那样,我们可以从 gitlab 数据库获取注册令牌。
ansible 剧本任务:
- name: Extract Runner Registration Token directly from Gitlab DB
become: true
become_user: gitlab-psql
vars:
ansible_ssh_pipelining: true
query: "SELECT runners_registration_token FROM application_settings ORDER BY id DESC LIMIT 1"
psql_exec: "/opt/gitlab/embedded/bin/psql"
gitlab_db_name: "gitlabhq_production"
shell: '{{ psql_exec }} -h /var/opt/gitlab/postgresql/ -d {{ gitlab_db_name }} -t -A -c "{{ query }}"'
register: gitlab_runner_registration_token_result
Run Code Online (Sandbox Code Playgroud)
但此任务不会取回任何注册令牌(获取空字符串),因为application_settings表中不存在runners_registration_token列。但是该列存在,但返回的字符串被api 拒绝。runners_registration_token_encryptedrunners_registration_token_encryptedrunner-register
因此,我必须从 gitlab gui(在admin/runners中)复制跑步者注册令牌,将其硬编码到剧本中并再次运行剧本以成功注册堆栈。
有人可以解释一下 gitlab 在哪里存储 …
我的环境是 Centos 7,我刚刚安装了 gitlab-runner,当我作为安装 gitlab-runner 的用户(而不是 root)运行此命令时
sudo gitlab-runner register
Run Code Online (Sandbox Code Playgroud)
这将导致找不到命令,但如果我在没有 sudo 的情况下运行
gitlab-runner register
Run Code Online (Sandbox Code Playgroud)
它运行但显示了这一行
WARNING: Running in user-mode.
WARNING: The user-mode requires you to manually start builds processing:
WARNING: $ gitlab-runner run
WARNING: Use sudo for system-mode:
WARNING: $ sudo gitlab-runner...
Run Code Online (Sandbox Code Playgroud)
有人知道如何解决这个问题吗