How to upgrade Gitlab 5.1 to 5.2 on CentOS 6 or RHEL6

Last modified: [last-modified]

This document assumes you’ve followed my previous post¬†for deploying Gitlab on CentOS 6/RHEL6 and have already upgraded that deployment from 5.0 to 5.1.

If you haven’t already switched from the default version (1.7.1) of git that comes with CentOS 6 / RHEL6 to git 1.8.2.3 please follow this post first before continuing with these instructions. Even if you don’t care about that error message follow the instructions so you’re using git 1.8.2.3 instead of 1.7.1.

Now then. Lets get to it.

1. Stop gitlab and switch to sa_gitlab

 

2. Get the latest code for Gitlab and Gitlab-shell

 

3. Install libs, migrations, etc? (I stole this from the Gitlab guys)

 

4. Switch back to root and update the init script

 

5. Start up Gitlab

 

You should be good to go at this point. The first load took a while for me after the update.

 

References

4 thoughts on “How to upgrade Gitlab 5.1 to 5.2 on CentOS 6 or RHEL6

  1. Always something…
    This Gitlab is taking too much of my time.
    I decided to put my comment here, as I have already upgraded Gitlab to 5.2.

    So, recently I make the Gitlab webpage working under https, but broke down git commands to Gitlab repositories, e.g.:

    git fetch
    /usr/local/rvm/rubies/ruby-1.9.3-p429/lib/ruby/1.9.1/net/http.rb:800:in `connect': SSL_connect returned=1 errno=0 state=SSLv3 read server certificate A: excessive message size (OpenSSL::SSL::SSLError)
    from /usr/local/rvm/rubies/ruby-1.9.3-p429/lib/ruby/1.9.1/net/http.rb:800:in `block in connect'
    from /usr/local/rvm/rubies/ruby-1.9.3-p429/lib/ruby/1.9.1/timeout.rb:55:in `timeout'
    from /usr/local/rvm/rubies/ruby-1.9.3-p429/lib/ruby/1.9.1/timeout.rb:100:in `timeout'
    from /usr/local/rvm/rubies/ruby-1.9.3-p429/lib/ruby/1.9.1/net/http.rb:800:in `connect'
    from /usr/local/rvm/rubies/ruby-1.9.3-p429/lib/ruby/1.9.1/net/http.rb:756:in `do_start'
    from /usr/local/rvm/rubies/ruby-1.9.3-p429/lib/ruby/1.9.1/net/http.rb:745:in `start'
    from /home/sa_gitlab/gitlab-shell/lib/gitlab_net.rb:56:in `get'
    from /home/sa_gitlab/gitlab-shell/lib/gitlab_net.rb:17:in `allowed?'
    from /home/sa_gitlab/gitlab-shell/lib/gitlab_shell.rb:51:in `validate_access'
    from /home/sa_gitlab/gitlab-shell/lib/gitlab_shell.rb:21:in `exec'
    from /home/sa_gitlab/gitlab-shell/bin/gitlab-shell:16:in `'
    fatal: Could not read from remote repository.

    Please make sure you have the correct access rights
    and the repository exists.

    I’ve got self-signed cert, did a lot of things (one of them was updating openssl, second downgrading ruby from 2.0.0. to 1.9.3) but without success.
    I updated the cert.pem for rvm, as many people advised but nothing is changing…
    Any ideas?

  2. Sometimes it’s just better to go sleep and try another day. ;)

    The error above was caused by a bad certificate put in Apache config.
    The error I had later was:

    /usr/local/rvm/rubies/ruby-1.9.3-p429/lib/ruby/1.9.1/net/http.rb:800:in `connect': SSL_connect returned=1 errno=0 state=SSLv3 read server certificate B: certificate verify failed (OpenSSL::SSL::SSLError)

    It’s a typical error when using gitlab-shell with self-signed certificate.

    However, it has been solved by Gitlab team:

    https://github.com/gitlabhq/gitlabhq/issues/3292

    All I had to do was add in /home/sa_gitlab/gitlab-shell/config.yml two lines:

    http_settings:
    self_signed_cert: true

    All available options are shown in /home/sa_gitlab/gitlab-shell/config.yml.example

    I hope somebody will gain some time because of my mistakes. ;)

  3. Hi,

    After upgradingto 5.2, having problems pushing anything to Gitlab. It worked before with no issue but after the upgrade, it no longer works.

    What could be the problem?

    TIA

    /TESTING> mkdir decrumple
    /TESTING> cd decrumple/
    TESTING/decrumple> git init
    Initialized empty Git repository in .git/
    TESTING/decrumple> touch README
    TESTING/decrumple> git add README
    TESTING/decrumple> git commit -m ‘first commit’
    Created initial commit 86e4811: first commit
    0 files changed, 0 insertions(+), 0 deletions(-)
    create mode 100644 README
    TESTING/decrumple> git remote add origin [email protected]:srvimg/decrumple.git
    TESTING/decrumple> git push -u origin master
    usage: git-push [–all] [–tags] [–receive-pack=] [–repo=all] [-f | –force] [-v] [ …]
    TESTING/decrumple> git push origin master
    fatal: ‘srvimg/decrumple.git’ does not appear to be a git repository
    fatal: The remote end hung up unexpectedly
    error: failed to push to ‘[email protected]:srvimg/decrumple.git’

    • OK, never mind – my fault. I think I did something wrong during the ssh key setup.
      Thanks!

Leave a Reply

Your email address will not be published. Required fields are marked *