Articles of gitlab

Gitlab与Apache代理

我有一台运行在Mac OS X机器上的apache2服务器,与在虚拟机上运行Gitlab的机器相同。 Mac IP:192.168.0.7 Ubuntu(虚拟)IP:192.168.0.12 我希望apache将gitlab.mydomain.com转到Ubuntu虚拟机,而anythingelse.mydomain.com转到Mac。 我添加了一个文件(gitlab.mydomain.conf)到/private/etc/apache2/other/ (在Mac上),内容如下 <VirtualHost *:80> ServerName gitlab.mydomain.com ProxyPass / http://192.168.0.12 ProxyPassReverse / http://192.168.0.12 ProxyPreserveHost On </VirtualHost> Ubuntu虚拟机文件中的gitlab.yml包含 ##Gitlab settings gitlab: ## Web server settings host: gitlab.mydomain.com port: 80 https: false 当我去gitlab.mydomain.com我得到以下错误: Proxy Error The proxy server received an invalid response from an upstream server. The proxy server could not […]

GitLab&nginx:502

我已经按照给定的官方说明安装了GitLab,但是在尝试使用它时收到了502错误。 Nginx日志条目: *30 upstream prematurely closed connection while reading response header from upstream, client: 95.27.118.xx, server: gitlab.somehost.net, request: "GET /users/sign_in HTTP/1.1", upstream: "http://unix:/home/git/gitlab/tmp/sockets/gitlab.socket:/users/sign_in", host: "gitlab.somehost.net" 正如我从以前的GitLab安装经验中记得的那样,错误原因是GitLab在第一次用户访问时初始化,而nginx认为它是超时的,所以解决方法是增加一些超时值。 问题是我不记得哪个超时我应该增加(这解决了以前的安装我的错误),谷歌并没有帮助我。

我怎样才能把gitlab数据目录放在另一个驱动器上?

我的gitlab安装空间不足。 我想将用户的存储库移动到另一个驱动器。 我无法find任何有关这样做的演练或好的论坛post。 我尝试将/opt/gitlab/apps/gitlab/repositories到另一个驱动器,然后创build从原始文件夹名称到新文件夹的符号链接。 只要它允许我读取存储库中的数据,它就工作正常,但在试图推送到主分支( git push -u origin master )时试图创build一个新的repo时失败,说明我没有权限承诺主人。 当我把文件夹放回原位而不是符号链接时,所有的操作都按照预期进行。 有一个更好的/正确的方式将存储库移动到不同的位置,并在系统上不同的驱动器?

将回购从普通的git移动到GitLab服务器

我有两个服务器,一个旧的服务器在/opt/下运行三个存储库。 这些项目现在被移到一个新的服务器上,我select为了GUI而运行gitlab ,并且能够邀请朋友学习编程,并且有一个更容易的地方来查看和pipe理项目。 但是,当移动时,我想保留我的旧代码库的修订。 不知何故,我认为只是做scp -r old-server.net:/opt/project.git /gitlab/就足够了,但是这个失败了。 我导航到gitlab并创build一个新的回购,只是为了得到创build一个维基的文件夹结构和一个名为/gitlab/project.git与旧服务器上的文件夹结构相同的代码文件夹(显然没有代码)和该项目在gitlab加载罚款,但后来我做rm -rf project.git并做了scp …现在我得到一个500 We're sorry, but something went wrong. 。 我的猜测是,服务器文件夹中的修订版本或URL可能是错误的,但是我无法通过手动或通过gitlab上的文档来查找任何内容。 任何人做了类似的事情 先谢谢你!

gitlab的SSH访问连接被拒绝

我试图通过公钥authentication在SSH中使用我的帐户访问gitlab。 我已经上传了我的公钥,这里是我的SSHconfiguration: content of /home/$my_user/.ssh/config Host gitlab User git Port 22 Hostname gitlab.$my_domain IdentityFile /home/$my_user/.ssh/id_rsa IdentitiesOnly yes 这是我试过的命令: mkdir $my_project cd $my_project git init touch README git add README git commit -m 'first commit' git remote add origin gitlab:$my_user/$my_project.git git push -u origin master 这里是sshd日志文件: auth.log 这里是客户端的堆栈 : 客户端堆栈 当我通过身份validation,我的密钥正确加载从〜git / .ssh / authorized_keys,我认为麻烦来自客户端。 但是我无法确定问题来自哪里,也不知道如何解决问题。 […]

GitLab自动部署

我将在我的学校创build一个gitlab服务器来承载类代码。 我希望这样做,每当任何用户推到gitlab它自动部署项目到/var/www/gitdeploy/<repo-user>/<repo>/<branch> ,以这样一种方式, http://<myServer>/gitdeploy/<repo-user>/<repo>/<branch> 。 最好是部署所有分支机构,但至less主人会没事的。 所有这些将在同一台服务器上运行。 我听说过Gitlab CI,但不确定是否适合我,而且我也不知道如何设置它。 我怎么能这样做? 编辑:另外,我想我应该指定,我希望它的所有用户,希望没有我configuration为每个用户,冰环球

configurationGitlab使用FreeIPA作为LDAP服务器

我遇到了一些麻烦,我似乎无法解决这个问题。 请按照以下scheme: 我有两台服务器: ONE(10.0.3.10):基于Ubuntu,具有以下configuration安装的Gitlab(作为deb包) /etc/gitlab/gitlab.rb # The URL through which GitLab will be accessed. external_url "https://gitlab.example.com/" # Whether to redirect http to https. nginx['redirect_http_to_https'] = true nginx['ssl_certificate'] = "/etc/ssl/my-ssl/ssl-unified.crt" nginx['ssl_certificate_key'] = "/etc/ssl/my-ssl/ssl.key" # The directory where Git repositories will be stored. git_data_dir "/var/opt/gitlab/git-data" gitlab_rails['ldap_enabled'] = true gitlab_rails['ldap_servers'] = YAML.load <<-EOS # remember to close this […]

GitLab没有监听SSH端口

我刚刚通过omnibus在运行Ubuntu 14.0.4 LTS的VPS上安装了GitLab CE,对/etc/gitlab/gitlab.rb进行了以下更改并重新运行了sudo gitlab-ctl reconfigure : gitlab_workhorse['listen_network'] = "tcp" gitlab_workhorse['listen_addr'] = "127.0.0.1:8181" external_url 'https://gitlab.myserver.com/' gitlab_rails['gitlab_shell_ssh_port'] = 2222 web_server['external_users'] = ['www-data'] nginx['enable'] = false 我的Apache VirtualHostconfiguration正在工作,我可以访问https://gitlab.myserver.com/上的Web界面,在那里我添加了我的SSH密钥,但是当克隆/推送/ etc到/从ssh://[email protected]:2222/mygroup/myproject.git / / ssh://[email protected]:2222/mygroup/myproject.git我收到 ssh: connect to host gitlab.haggi.me port 2222: Connection refused fatal: Could not read from remote repository. Please make sure you have the correct access rights […]

在Ubuntu 16.04上安装gitlab-ce的问题(xenial)

我一直在尝试从Ubuntu 16.04(GNU / Linux 4.6.5-x86_64-linode71 x86_64)的Omnibus软件包中安装gitlab-ce,而且我完全陷入困境。 问题#1 所有的文档说运行命令sudo apt-get install gitlab-ce但我总是得到一个无法find包gitlab-ce错误。 做一个sudo apt search gitlab显示,有一个名为gitlab的包,所以我假设文档是错误的,我应该安装它。 问题#2 安装运行正常,直到到达nginx设置的位置,然后失败,出现以下错误: Creating config file /etc/nginx/sites-available/gitlab.mydomain.net with new version cp: cannot create regular file '/etc/nginx/sites-available/gitlab.mydomain.net': No such file or directory dpkg: error processing package gitlab (–configure): subprocess installed post-installation script returned error exit status 1 我没有做任何特别的安装。 任何人都可以给我任何提示? 更新1 我没有意识到在Ubuntu有一个股票gitlab包,这至less解释了我的问题的一部分。 只是为了澄清,我已经完成了关于页面的完整说明,所以我已经将gitlab-ce回购添加到了我的apt源代码中: […]

用于存储库克隆的Gitlab HTTPS URI不起作用 – 无法validationSSL主机 – 致命:无法访问

当我从Eclipse中创buildEclipse – >文件 – >导入 – >项目 – >项目 – >克隆URI – >从Gitlabinputrepository HTTPS URI时,出现错误: 可能的原因: url不正确 没有networking连接(例如错误的代理设置) SSL主机无法validation(在Gitconfiguration中设置http.sslVerify = false) 我在Eclipseconfiguration中添加了http.sslVerify false ,但它仍然不起作用。 如果我在cmd中使git clone https://my.example.com/gitlab/root/repository.git ,我得到: 克隆到“存储库”… 致命:无法访问“ https://my.example.com/gitlab/root/repository.git ”:请求的URL返回错误:500 Gitlab生产日志显示: 按项目处理:: GitHttpController#info_refs为HTML 参数:{“service”=>“git-upload-pack”,“namespace_id”=>“java”,“project_id”=>“project.git”} 在102ms内完成500个内部服务器错误(ActiveRecord:2.5ms) JWT :: DecodeError(无JSON Web令牌): lib / gitlab / workhorse.rb:120:在'verify_api_request!'中 app / controllers / projects / git_http_client_controller.rb:154:在'verify_workhorse_api!'中 lib / […]