【问题标题】:Bitnami GitLab 5.0 and git & Eclipse EGit quick startBitnami GitLab 5.0 和 git & Eclipse EGit 快速入门
【发布时间】:2013-04-02 06:34:23
【问题描述】:

我们刚刚使用Bitnami stack 设置了GitLab 5.0,需要快速启动。

Bitnami 默认禁用 SSH。这对我来说没问题,我更喜欢使用 HTTP。但似乎 GitLab 5.0 并不能顺利支持 HTTP。
例如在项目页面http://192.168.133.99/gitlab/publicproject1,切换到HTTP选项时,下面的帮助没有更新。

我有一个项目publicproject1 被检查为公开。但我无法以任何方式克隆它(使用 git 或 EGit):

weibl@FX-JSJ532 ~/pp1
$ git clone http://192.168.133.99/gitlab/publicproject1.git
Cloning into 'publicproject1'...
fatal: http://192.168.133.99/gitlab/publicproject1.git/info/refs not found: did you run git update-s
erver-info on the server?

weibl@FX-JSJ532 ~/pp1
$ git clone http://192.168.133.99/gitlab/publicproject1
Cloning into 'publicproject1'...
fatal: http://192.168.133.99/gitlab/publicproject1/info/refs not found: did you run git update-serve
r-info on the server?

我使用 GitHub 已经有一段时间了,所以可能我错过了一些 GitHub 自动处理的东西。

我找到了这个 Q egit plugin for Eclipse 。我的 SSH 密钥已经到位。

更新:我检查了"did you run git update-server-info" error on a Github repository 上的所有建议。
并确认我是这个项目的主人。

更新 2:Bitnami Gitlab 没有 Nginx,但 Apache http://bitnami.com/stack/gitlab/README.txt

错误与mentioned issue 3384相同。

>git push -u origin master
/opt/bitnami/ruby/lib/ruby/1.9.1/net/http.rb:762:in `initialize': getaddrinfo: T
emporary failure in name resolution (SocketError)
        from /opt/bitnami/ruby/lib/ruby/1.9.1/net/http.rb:762:in `open'
        from /opt/bitnami/ruby/lib/ruby/1.9.1/net/http.rb:762:in `block in connect'
        from /opt/bitnami/ruby/lib/ruby/1.9.1/timeout.rb:54:in `timeout'
        from /opt/bitnami/ruby/lib/ruby/1.9.1/timeout.rb:99:in `timeout'
        from /opt/bitnami/ruby/lib/ruby/1.9.1/net/http.rb:762:in `connect'
        from /opt/bitnami/ruby/lib/ruby/1.9.1/net/http.rb:755:in `do_start'
        from /opt/bitnami/ruby/lib/ruby/1.9.1/net/http.rb:744:in `start'
        from /opt/bitnami/apps/gitlab/gitlab-shell/lib/gitlab_net.rb:56:in `get'
        from /opt/bitnami/apps/gitlab/gitlab-shell/lib/gitlab_net.rb:17:in `allowed?'
        from /opt/bitnami/apps/gitlab/gitlab-shell/lib/gitlab_shell.rb:51:in `validate_access'
        from /opt/bitnami/apps/gitlab/gitlab-shell/lib/gitlab_shell.rb:21:in `exec'
        from /opt/bitnami/apps/gitlab/gitlab-shell/bin/gitlab-shell:16:in `<main>'
fatal: The remote end hung up unexpectedly

更新 3:passenger.conf

更新 4:GitLab 应用程序的 Apache2 配置:gitlab.conf

如何制作简单的根(不是相对根)?

更新 5:我已启用 SSH 并将 GitLab 应用程序 URL 从 /gitlab 更改为 / aka root。 Bitnami: How to configure GitLab 5.0 application in Apache2 not to have relative root? 但是,当使用 git 或 EGit 访问时,我仍然遇到与 UPDATE 2 相同的错误。 我唯一的线索是 GitLab UI 已损坏(似乎没有应用 CSS), 所以可能需要对 GitLab 应用程序进行一些额外的配置。救命!!

未找到解决方案。实际上,我得到了更新的 VM 版本 5.1.0-2,其中提到了这里提到的主要错误,但是现在有一个普遍的问题 How to update GitLab in Bitnami stack

【问题讨论】:

标签: eclipse git egit bitnami gitlab


【解决方案1】:

来自Bitnami wiki

重要提示:必须启用 SSH 服务器才能拉取 您的代码进入应用程序。 SSH 服务器默认禁用 在 BitNami GitLab 虚拟机中。检查this guide以了解如何 启用它。

再次引用:

对于 Ubuntu

$ sudo mv /etc/init/ssh.conf.back /etc/init/ssh.conf
$ sudo start ssh

现在看来,如果不启用 SSH,我就无法使用 GitLab。

【讨论】:

    【解决方案2】:

    我看到您的 GitLab 服务器有一个相对根目录:192.168.133.99/gitlab 而不仅仅是 192.168.133.99/

    最近修复了一个错误:issue 3384: Gitlab can't clone or push:

    但是,在实际进行克隆时,推拉。内部api由gitlab-shellgitlab服务器的同一台机器上调用。现在因为 nginx /etc/nginx/sites-enabled/gitlabgitlab 配置设置为:

    server {
      listen YOUR_SERVER_IP:80 default_server;         # e.g., listen 192.168.1.1:80;
      server_name YOUR_SERVER_FQDN;     # e.g., server_name source.example.com;
      root /home/git/gitlab/public;
    

    服务器上的用户git调用gitlab-shell访问YOUR_SERVER_FQDN的web api,但现在用户git的服务器IP是127.0.0.1
    所以 gitlab 现在不是有效的网站。但是默认的 nginx 站点在端口 80 上侦听任何 IP,因此

    <html>
    <head>
    <title>Welcome to nginx!</title>
    </head>
    <body bgcolor="white" text="black">
    <center><h1>Welcome to nginx!</h1></center>
    </body>
    </html>
    

    已发出。因为它是默认nginx站点的索引页。

    解决方法是将gitlab nginx配置文件/etc/nginx/sites-enabled/gitlab设置为:

    server {
      listen *:80 default_server;         # e.g., listen 192.168.1.1:80;
      server_name YOUR_SERVER_FQDN;     # e.g., server_name source.example.com;
      root /home/git/gitlab/public;
    

    pull request 正在进行中。

    【讨论】:

    猜你喜欢
    • 1970-01-01
    • 1970-01-01
    • 1970-01-01
    • 2015-07-13
    • 2014-11-12
    • 1970-01-01
    • 1970-01-01
    • 2019-03-09
    • 2012-03-19
    相关资源
    最近更新 更多