Articles of gitlab

gitlab端口转发汤姆foolery

我们有一个面向公众的Web服务器(CentOS 6 w / Apache),它需要将来自公共和私有接口的请求转发到运行Gitlab的单独主机。 为了安全起见,我们无法站出一个有公众的新主人。 我们select了一个非标准的SSH端口作为转发端口发送到Gitlab机器。 问题是,我们应该如何最好地实现这个,以便用户做一个git推/拉等等。作为参考,这里是一个图表,展示了我们之后的事情: 我们试图尽可能的方便用户使用,所以我们想到的可能是某种端口触发机制,让git请求通过使用端口2500的PublicWebServer自动转发到侦听缺省值22的gitlab内部机器。内部用户会使用相同的基本过程。 PublicWebServer是双宿主的。 如果没有端口触发器,这个概念至less看起来好听吗? 这可以使用iptables来完成吗?

Gitlab找不到与nginx代理(负载平衡器)

我有以下的nginxconfiguration: server { listen 80 default_server; listen [::]:80 default_server ipv6only=on; root /usr/share/nginx/html; index index.php index.html index.htm; location /git { proxy_pass http://134.103.176.101:10080; include proxy_params; } } 134.103.176.101是我的第二个托pipeGitlab的服务器。 所以当我浏览http:// server1 / git我得到我的gitlab。 问题是,所有的.pngs .ttf和.woff文件都找不到。 那是因为他突然从path中删除了/ git http://server1/assets/SourceSansPro-Regular-60f619fe2b3b48b193b9047abd7f8872.ttf Failed to load resource: the server 但是我已经将GITLAB_RELATIVE_URL_ROOT设置为/ git /在我的Gitlab安装。 为什么发生这种情况? 我怎样才能得到这个图像? 谢谢! 🙂 编辑:我已经find了重写缺less的请求的解决方法 #Rewrites the request, extracting a fragment […]

恢复GitLab备份后,新的SSH公钥将随机取代其他用户的现有密钥

这发生在GitLab 8.6.4的新安装(未升级)上。 我安装了GitLab,我的团队对它进行了评估。 当然我和其他人进入了我们的SSH公钥。 作为我们评估的一部分,我做了一个GitLab备份并将其恢复。 在我恢复了备份之后,新用户Shung Wanginput了他的SSH公钥。 现在,每当我尝试通过SSH访问git仓库时,服务器都认为我是“王”。 例如,当我testing我的Ubuntu 14.04笔记本电脑的SSH连接时,我得到了这个: ssh -T git@gitserver Welcome to GitLab, Shung Wang! 作为第二个testing,我试图克隆一个Shung无法访问的私有存储库: git clone git@gitserver:sw/devops.git Cloning into 'devops'… GitLab: The project you were looking for could not be found. fatal: Could not read from remote repository. Please make sure you have the correct access rights and the repository […]

无法创build运行服务的用户帐户

我正在运行Server 2012 R2(服务器核心),而且在设置Gitlab CI Multi Runner时,遇到了麻烦,无法像专门为此服务创build的用户那样运行服务。 以下是相关问题: https : //gitlab.com/gitlab-org/gitlab-ci-multi-runner/issues/1265 我已经创build了这样的用户帐户: net user gitlab-runner "P@55w0rd" /add /fullname:"GitLab CI Runner User" /homedir:"C:\Users\gitlab-runner" 当我尝试安装跑步者时,我得到一个错误,说明该帐户无效: .\gitlab-ci-multi-runner-windows-amd64 install -u "gitlab-runner" -p "P@55w0rd" FATAL: Failed to install gitlab-runner: The account name is invalid or does not exist, or the password is invalid for the account name specified. 这个错误来自Windows,当我尝试手动执行时,我得到了同样的结果: .\gitlab-ci-multi-runner-windows-amd64 install […]

Gitlab – Postgresql在g​​itlabctl-reconfigure之后不再工作了

我刚安装了一个全新的Gitlab服务器。 我第一次做gitlab-ctl重新configuration它就像一个魅力。 之后,我没有改变任何东西,但再次运行gitlab-ctl reconfigure。 这是问题开始的地方,我看到很多连接到pgsql的失败尝试。 [execute] psql: could not connect to server: No such file or directory Is the server running locally and accepting connections on Unix domain socket "/var/opt/gitlab/postgresql/.s.PGSQL.5432"? 所以我尝试了gitlab-ctl stop和gitlab-ctl start,这说明它启动了postgresql。 ok: run: postgresql: (pid 11766) 0s 我该如何解决这个问题? 我最终得到了一个502错误…“哎呀,GitLab花了太多的时间来回应。 问候, 我迷路了,这是一个只有gitlab和nagios,munin,rsync的jessie。

Gitlab post-receive hook主机密钥validation失败

我有3台服务器: werkstation.example.com – >服务器,其中gitlab存储库克隆和更改存储库中的文件 git.example.com – >存储库“tomcat”的gitab服务器 docker.example.com – >服务器,其中的文件将被复制与GIT钩子 我的git钩子: #!/bin/sh read oldrev newrev refname REPO="[email protected]:michaelv1234/tomcat.git" BRANCH=`echo $refname | sed -n 's/^refs\/heads\///p'` BRANCH_DIR="/home/michael" SSH_DEST="[email protected]" if [ "$newrev" -eq 0 ] 2> /dev/null; then # branch is being deleted echo "Deleting remote branch $SSH_DEST $BRANCH_DIR/$BRANCH" echo "$SSH_DEST" /bin/sh ssh "$SSH_DEST" /bin/sh <<-EOF cd "$BRANCH_DIR" && […]

在GitLAB Bitnami中configuration电子邮件设置

在GitLAB Bitnami中configuration电子邮件设置和持续集成的问题 我有问题完成所有这些可理解的教程,但不可理解的结果。 我遵循这些简单的步骤来configuration电子邮件: https://wiki.bitnami.com/Applications/BitNami_GitLab#How_to_configure_the_email_settings_of_GitLab.3f 但无济于事。 有什么我失踪了吗? 还是有教程主要是那些谁错过了什么? 从bitnami q2提到的问题,但无济于事。 有没有人有任何想法,我会解决这个问题? 我非常感激,希望你们的后代能够得到祝福。 更新:( 我只是要发布我的答案,适合我 ) 在电子邮件configuration 所以问题的解决scheme是 按照此处的说明https://wiki.bitnami.com/Applications/BitNami_GitLab#How_to_configure_the_email_settings_of_GitLab.3f 如果某些东西不起作用,那么在发送邮件时总是检查gitlab / htdocs / log / sidekiq.log以查找可能的错误消息。 还检查您的smtp服务器,如果其工作http://mxtoolbox.com/diagnostic.aspx 检查你的服务器是否可以运行通过邮件端口 我认为这些解决scheme很可能解决了您的问题,我正在使用亚马逊bitnami gitlab。

GitLab自定义钩子不执行

我有GitLab CE 8.9.0在本地服务器上运行,但我遇到与自定义挂钩不运行的问题。 这里也不乏类似的问题,但是大多数似乎已经过时了,主要是关于本机的git钩子而不是GitLab的“自定义钩子”。 我已经阅读了GitLab的文档,但仍然有类似的问题。 我的设置看起来像这样: $ pwd /var/opt/gitlab/git-data/repositories/[redacted]/[redacted].git $ ls -l custom_hooks/ total 4 -rwxr-xr-x 1 git git 127 Jun 22 13:15 post-receive $ cat custom_hooks/post-receive #!/bin/sh git –work-tree=/var/www/html/~dev/[redacted] –git-dir=/var/opt/gitlab/git-data/repositories/[redacted]/[redacted].git checkout -f 我能够手动运行脚本并查看预期的结果: $ whoami git $ pwd /var/opt/gitlab/git-data/repositories/[redacted]/[redacted].git/custom_hooks $ ./post-receive $ 任何想法,为什么它没有运行?

Gitlab使用HTTPS的git克隆 – 无法获得本地发行者证书

当我使用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。 有关configuration的更多详细信息: 存储库克隆的Gitlab HTTPS URI不起作用 – 无法validationSSL主机 – 致命:无法访问 我已经尝试添加SSL证书,因为它们与Apacheconfiguration中的相同,但是没有帮助: nginx ['ssl_certificate'] =“/etc/gitlab/ssl/my.example.com.crt” nginx ['ssl_certificate_key'] =“/etc/gitlab/ssl/my.example.com.key” 如何将其configuration为通过HTTPS进行git操作而不禁用validation?

docker工人与docker执行者的Gitlab亚军

我想在Docker容器中运行Gitlab CI Runner,同时也使用Docker执行程序在我们的Docker容器中运行我的构build,所有这些都在CoreOS之上。 这甚至有可能吗? 我目前发现的每个文档都假定Gitlab Runner在主机操作系统上运行,这对我来说不是一个可行的select。 另一种方法是使用专门的gitlab-runner容器,并在每个容器中安装构build依赖项。