1

We have just set up GitLab 5.0 using Bitnami stack and need quick start.

By Bitnami default SSH is disabled. That is OK with me, I'd prefer use HTTP. But it seems that GitLab 5.0 doesn't smoothly support HTTP.
For example on project page http://192.168.133.99/gitlab/publicproject1, when switching to HTTP option, help below is not updated.

I have one project publicproject1 checked as public. But I can't clone it in any way (using git or 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?

I have been using GitHub for a while, so maybe I missed something that is handle by GitHub automatically.

I found this Q egit plugin for Eclipse . My SSH keys are in place.

UPDATE: I checked all advices on "did you run git update-server-info" error on a Github repository.
And checked that I am master of this project.

UPDATE 2: Bitnami Gitlab doesn't have Nginx, but Apache http://bitnami.com/stack/gitlab/README.txt

Error is the same as 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

UPDATE 3: passenger.conf

passenger.conf

UPDATE 4: Apache2 config for GitLab aplication: gitlab.conf

enter image description here

How to make simple root (not relative root)?

UPDATE 5: I have enabled SSH and change GitLab app URL from /gitlab to / aka root. Bitnami: How to configure GitLab 5.0 application in Apache2 not to have relative root? However I still have the same error as in UPDATE 2 when accessing with git or EGit. The only clue I have, is that GitLab UI is corrupted (seems like no CSS applied), so maybe some additional configuration for GitLab application required. HELP!!

SOLUTION was not found. I actually got newer VM version 5.1.0-2 with main bug mentioned here fixed, however there is general question now How to update GitLab in Bitnami stack

Community
  • 1
  • 1
Paul Verest
  • 60,022
  • 51
  • 208
  • 332
  • Seems like GitLab releases 5.0 without proper testing. – Paul Verest Apr 09 '13 at 09:34
  • Please put only text, not picture of text: text can be indexed and searched. – VonC Apr 09 '13 at 11:45
  • I am sorry, I have not yet found way to grab text from running Ubuntu server inside VirtualBox 4. – Paul Verest Apr 09 '13 at 11:48
  • 1
    If you don't have an internet session from the VirtualBox guest session, could you share a folder for your host to access to? (http://news.softpedia.com/news/How-to-Fix-Windows-7-Sharing-in-VirtualBox-123021.shtml) That would allow to write in a file from guest, and read it from host. – VonC Apr 09 '13 at 11:53
  • 1
    A full re-installation of GitLab, following step-by-step https://github.com/gitlabhq/gitlabhq/blob/5-0-stable/doc/install/installation.md should help. For the Apache config (with `/`), see https://github.com/gitlabhq/gitlab-recipes/blob/master/apache/gitlab – VonC Apr 10 '13 at 10:22

2 Answers2

2

From Bitnami wiki

IMPORTANT: It is necessary to enable SSH server to be able to pull your code into the application. The SSH server is disabled by default in the BitNami GitLab Virtual Machine. Check this guide to know how to enable it.

quote again:

For Ubuntu

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

Now it seems like I can't use GitLab without SSH enabled.

Paul Verest
  • 60,022
  • 51
  • 208
  • 332
1

I see you have a relative root for your GitLab server: 192.168.133.99/gitlab instead of just 192.168.133.99/.

A bug has recently been fixed: issue 3384: Gitlab can't clone or push:

However when actually doing clone, push and pull. The internal api is invoked by gitlab-shell on the same machine of the gitlab server. Now since the gitlab config for nginx /etc/nginx/sites-enabled/gitlab is set as:

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;

user git on the server invoked gitlab-shell to access web api at YOUR_SERVER_FQDN, but now the server IP to user git is 127.0.0.1.
So gitlab is not valid website now. But the default nginx site listens to any IP at port 80 so the

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

is given out. Because it is the index page of default nginx site.

Solution is to set the gitlab nginx config file /etc/nginx/sites-enabled/gitlab as:

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;

A pull request is in progress.

VonC
  • 1,262,500
  • 529
  • 4,410
  • 5,250
  • Well, I don't have yet server name, and IP is dynamic. So now I need to get both thing before I can continue. – Paul Verest Apr 02 '13 at 07:07
  • By the way, using shorter URL like git clone http://192.168.133.99/publicproject1 doesn't help. – Paul Verest Apr 02 '13 at 07:10
  • @PaulV No, `http://192.168.133.99/gitlab/publicproject1` is good (the final `.git` isn't mandatory). I prefer using https address myself https://github.com/VonC/compileEverything/blob/master/apache/env.conf.tpl#L195-L228 – VonC Apr 02 '13 at 07:25
  • Bitnami GitLab goes with Apache, not Nginx – Paul Verest Apr 09 '13 at 09:03
  • @PaulVerest ok. I uses GitLab with Apache myself: https://github.com/VonC/compileEverything/blob/master/gitlab/apache.cnf.tpl – VonC Apr 09 '13 at 09:19
  • That is nice. Where and what needs changes? – Paul Verest Apr 09 '13 at 09:29
  • @PaulVerest don't forget that, in my custom environment, I do have ssh activated. Plus I need passenger_module in order to manage the relative path I want GitLab to be referenced with (ie, not https://myserver, but https://myserver/gitlab). – VonC Apr 09 '13 at 09:32
  • I have already enabled SSH. Then I need $ sudo gem install passenger $ passenger-install-apache2-module. Then change what? I actually have /opt/bitnami/apache2/conf/bitnami/passenger.conf See in Question UPDATE 3 – Paul Verest Apr 09 '13 at 09:47
  • @PaulVerest I don't really care about that passenger.conf: as you can see in my Apache config for GitLab (https://github.com/VonC/compileEverything/blob/master/gitlab/apache.cnf.tpl), I redefined `PassengerRoot` anyway. This Apache config is enough for GitLab to be properly accessed. – VonC Apr 09 '13 at 11:08
  • @PaulVerest for accessing GitLab directly on '/', you don't need passenger: https://gist.github.com/radmen/3689615#comment-771506 – VonC Apr 09 '13 at 11:47