How to check the version of GitLab? - gitlab

How to check which version of GitLab is installed on the server?
I am about version specified in GitLab changelog:
https://gitlab.com/gitlab-org/gitlab-foss/blob/master/CHANGELOG.md
For example: "6.5.0", "6.4.3", etc.
Сan this be done only through the terminal?
Is there a way to do that remotely (with browser instead of terminal)?

I have updated my server to GitLab 6.6.4 and finally found the way to get version of GitLab remotely without SSH access to server.
You should be logged in to access the following page:
https://your.domain.name/help
It shows something similar to:
GitLab 6.6.4 42e34ae
GitLab is open source software to collaborate on code.
...
etc.

For omnibus versions:
sudo gitlab-rake gitlab:env:info
Example:
System information
System: Ubuntu 12.04
Current User: git
Using RVM: no
Ruby Version: 2.1.7p400
Gem Version: 2.2.5
Bundler Version:1.10.6
Rake Version: 10.4.2
Sidekiq Version:3.3.0
GitLab information
Version: 8.2.2
Revision: 08fae2f
Directory: /opt/gitlab/embedded/service/gitlab-rails
DB Adapter: postgresql
URL: https://your.hostname
HTTP Clone URL: https://your.hostname/some-group/some-project.git
SSH Clone URL: git#your.hostname:some-group/some-project.git
Using LDAP: yes
Using Omniauth: no
GitLab Shell
Version: 2.6.8
Repositories: /var/opt/gitlab/git-data/repositories
Hooks: /opt/gitlab/embedded/service/gitlab-shell/hooks/
Git: /opt/gitlab/embedded/bin/git

You can access the version through a URL, the web GUI, and the ReST API.
Via a URL
An HTML page displaying the version can be displayed in a browser at https://your-gitlab-url/help. The version is displayed only if you are signed in.
Via a menu in the web GUI
If you do not care to type this URL, you can also access the same HTML page from a menu in the GitLab web GUI:
In GitLab 11 and later
Log in to GitLab
Click on the drop down menu in the upper right. Select Help.
The GitLab version appears at the top of the page
In earlier versions, like GitLab 9
Log in to GitLab
Click on the drop down menu in the upper left. Select Help.
And then the version appears at the top of the page
Via the ReST API
Log in as any user, select the user icon in the upper right of the screen. Select Settings > Access Tokens. Create a personal access token and copy it to your clipboard.
In a Linux shell, use curl to access the GitLab version:
curl --header "PRIVATE-TOKEN: personal-access-token" your-gitlab-url/api/v4/version

If you are using a self-hosted version of GitLab then you may consider running this command.
grep gitlab /opt/gitlab/version-manifest.txt

You have two choices (after logged in).
Use API url https://gitlab.example.com/api/v4/version (you can use it from command line with private token), it returns {"version":"10.1.0","revision":"5a695c4"}
Use HELP url in browser https://gitlab.example.com/help and you will see version of GitLab, ie GitLab Community Edition 10.1.0 5a695c4

You can view GitLab's version at: https://your.domain.name/help
Or via terminal: gitlab-rake gitlab:env:info

cd /opt/gitlab
cat version-manifest.txt
Example:
gitlab-ctl 6.8.2-omnibus
gitlab-rails v6.8.2
Current gitlab version is 6.8.2

Get information about GitLab and the system it runs on :
bundle exec rake gitlab:env:info RAILS_ENV=production
Example output of gitlab:env:info
System information
System: Arch Linux
Current User: git
Using RVM: yes
RVM Version: 1.20.3
Ruby Version: 2.0.0p0
Gem Version: 2.0.0
Bundler Version:1.3.5
Rake Version: 10.0.4
GitLab information
Version: 5.2.0.pre
Revision: 4353bab
Directory: /home/git/gitlab
DB Adapter: mysql2
URL: http://gitlab.arch
HTTP Clone URL: http://gitlab.arch/some-project.git
SSH Clone URL: git#gitlab.arch:some-project.git
Using LDAP: no
Using Omniauth: no
GitLab Shell
Version: 1.4.0
Repositories: /home/git/repositories/
Hooks: /home/git/gitlab-shell/hooks/
Git: /usr/bin/git
Read this article, it will help you.

Instead of http://domain-name/help you can also check your Gitlab version name in browser by logging as Admin
Go to http://domain-name
Log in to Gitlab as Admin (Root)
Go to Admin Area
On the right corner, below Groups tab, you can find Components tab
There you can find not only Gitlab version but also different components like Gitlab Shell, Gitlab workhorse, Gitlab API etc, version numbers
You will also find the suggestions to update the versions there

If using the Gitlab Docker image:
sudo cat /srv/gitlab/data/gitlab-rails/VERSION
Example output:
12.1.3

cat /opt/gitlab/version-manifest.txt |grep gitlab-ce|awk '{print $2}'

It can be retrieved using REST, see Version API :
curl --header "PRIVATE-TOKEN: 9koXpg98eAheJpvBs5tK" https://gitlab.example.com/api/v4/version
For authentication see Personal access tokens documentation.

I have Version: 12.2.0-ee and I tried the URL via (https://yourgitlab/help ) but I have not got this information.
In the other hand I got this with gitlab-rake with success into the command line:
sudo gitlab-rake gitlab:env:info
...
GitLab information
Version: 12.2.0-ee
...

The easiest way is to paste the following command:
cat /opt/gitlab/version-manifest.txt | head -n 1
and there you get the version installed. :)

you can use the package manager to query installed version of gitlab-ce. if it happens to be debian or ubuntu, like this:
dpkg -l | grep gitlab-ce | tr -s [:space:] | cut -d" " -f3
should work similarly with other distributions, assuming you used package manager to install.

this command line to know all the data of your gitlab install
gitlab-rake gitlab:env:info
and this command line to know are there new Gitlab versions, for you can update gitlab
yum --showduplicates list gitlab-ce
And once you know your current version and the latest gitlab update, you can update it with the following line command
yum install gitlab-ce-15.2.2-ce.0.el7

If you are an admin and if you want to see the Gitlab version (and more you didn't know about) click on the wrench/admin menu icon and under Components you can see a lot , especially if you are using Omnibus.

To check the version of gitlab on centos
rpm -qa | grep gitlab-ce

The following information is available from within the CI pipeline (GitLab >= 11.4):
Variable
Value
CI_SERVER_VERSION_MAJOR
The major version of the GitLab instance.
CI_SERVER_VERSION_MINOR
The minor version of the GitLab instance.
CI_SERVER_VERSION_PATCH
The patch version of the GitLab instance.
CI_SERVER_VERSION
The full version of the GitLab instance.

Related

GitKraken won't let me open my Private Repository on GitLab

So, in addition to GitKraken won't let me clone from a private repo on GitHub
I get this screen when opening my GitLab Repo:
Anyone got a solution of how to make my Repo 'non-private' or how to make GitKraken let me open this without the Pro Plan?
Already tried:
Generating new SSH Key in GitKraken
Removing Repo, Generate new GitLab connection, Clone Repo
Checked GitLab: GitKraken is an Authorized applications
Git Pull via command line gives no trouble, so no permission issue
...
6.5.1 is the last version to support private repo. You can see the release details at this link https://blog.axosoft.com/gitkraken-v6-0/#pricing-changes OR https://support.gitkraken.com/release-notes/6x/
And you can also download it (Mac version) from Axosoft https://release.axocdn.com/darwin/GitKraken-v6.5.1.zip OR https://release.gitkraken.com/darwin/GitKraken-v6.5.1.zip
I not sure how to turn off the automatic update function, so if you turn off GitKraken completely and reopen it, it will update to the latest version.
=======
Updated
Block IP Address for updating
For MacOS
echo "127.0.0.1 release.gitkraken.com" >> /private/etc/hosts
Windows 10 – “C:\Windows\System32\drivers\etc\hosts”
Linux – “/etc/hosts”
Mac OS X – “/private/etc/hosts”
Installing older version of Gitkraken is the only solution I guess to work on private repo if you want it for free and without student developer pack.
From the release notes, the last version to support private repo is v6.5.1.
Download link:
For windows: https://release.gitkraken.com/win64/GitKrakenSetup-6.5.1.exe
For linux (debian): https://release.axocdn.com/linux/GitKraken-v6.5.1.deb
For linux (tar.gz): https://release.axocdn.com/linux/GitKraken-v6.5.1.tar.gz
For mac: https://release.axocdn.com/darwin/GitKraken-v6.5.1.zip
Download old version of app
Official download URL for macOS. For Win you have link on Comments in this answer
EDIT:
OMG! I found it.
There is auto patcher who was build over yarn
https://github.com/5cr1pt/GitCracken
Work like a sharm 💪
Note:
It take a decent time to install, so be patient.
I had the same problem, this what I found:
They say, and I quote -
This was a licensing change we made 3 months ago. When we made the
change, we gave all existing users a 3 month free trial, which are all
expiring this week. Sounds like yours is one of them
BTW worth noting that if you're a student, you can use GitKraken for free:
https://www.gitkraken.com/student-resources
My solution is to uninstall GitKraken and install Fork, a very similar program with all the options that I have used previously in GitKraken. It's free and has a dark mode too :-)
(window users)
In your %appdata%/../Local/gitkraken, remove latest gk version you just updated, remove updater & use the previous version (& maybe buy a license)
(Windows solution)
I think this solution should work:
Since Private repo is moved to paid plan after v6.5.1 so make sure you download an earlier version (For example Windows: 5.0.4 - Change version number to any desired one)
If you had a newer version installed, get rid of it like this:
Uninstall that version
Go to C:/Users/USERNAME/appdata/local/ and remove GitKraken
Go to C:/Users/USERNAME/appdata/roaming/ and remove .gitkraken
Install the selected older version
Go to C:/Users/USERNAME/appdata/local/gitkraken and rename Update.exe to Update_.exe (Don't remove it. Needed for uninstalling)
Use it
Note: I had issues with some repos even with this solution and that could be because gitkraken saves config file in the repo (which is not shared with remote). So make sure you remove the local project and get it from remote again.
(Note: Newer version obviously contains more features. You may want to purchase a license to be updated and fine, as well as supporting the company)
If you have tried running GitKraken 6.5.1 on a recent version of Ubuntu, you have probably noticed that it has dependencies that can't be satisfied (gvfs-bin). However, you can run it in Docker by building an image for it based on Ubuntu 18.04!
Download the GitKraken package:
wget https://release.axocdn.com/linux/GitKraken-v6.5.1.deb
Create a Dockerfile. Replace YOURUSERNAME with your local username. Replace 1000 with your actual user and group IDs respectively:
FROM ubuntu:18.04
COPY GitKraken-v6.5.1.deb /tmp
RUN apt update && apt install gconf2 gconf-service libgtk2.0-0 libnotify4 libxtst6 libnss3 libxkbfile1 python gvfs-bin xdg-utils xauth libxss1 libasound2 -y
RUN dpkg -i /tmp/GitKraken-v6.5.1.deb
RUN groupadd -g 1000 YOURUSERNAME && useradd -u 1000 -g 1000 YOURUSERNAME
CMD ["/usr/bin/gitkraken", "--no-sandbox"]
Build the Docker image:
docker build -t gitkraken .
Allow Docker to connect to your local XServer:
xhost +local:docker
Run your GitKraken in a container, mapping your local home directory into the container. Again, replace your username and IDs:
docker run -ti --rm -e DISPLAY=$DISPLAY --network=host -v /home/YOURUSERNAME:/home/YOURUSERNAME --user 1000:1000 gitkraken
Uninstall and use an older version of gitkraken. V5.0.4 will continue to work as always.
Gitkraken does not update automatically in Linux, so Axosoft can't shove it down your throat. For Windows, there's SourceTree. Consolations to Mac users.
I have the GitKraken individual plan and can only use my account on one computer.
My laptop displays the same message regarding the private repository and blocks me. I thought that the individual plan would allow my single account on multiple computers.
I have been using GitKraken free version for more than an year. I ran into the same issue recently. I was able to get it working by reinstalling an older version.
Note: You need to do this whenever you restart your computer or Gitkraken.
My solution:
Remove the latest version from (window users) appdata%/../Local/gitkraken
Create a short cut to the folder where the previous version is installed.
Open shortcut
Start executable.
What happens when the update come up again. I will see then.
If anyone is looking for a solid Git linux client, try GitClient, they have an AppImage,
it doesnt have all features of Kraken but very solid,
https://github.com/francescmm/GitQlient
Save your files of Repository - Without Folder (.git)
Create new public repository
Copy and Commit your Files
Open your Repo (Git Kraken).
To expose your project from gitlab, go to Settings => General and select public under the "Visibility, project features, permissions" section.
To open a private repo under GitKraken, subscribe to their licence.

Nuxeo Source code installation Eroor

Hi i have tried installing nuxeo source code locally. but while installing it is giving the following error.
Please see the below screenshot to find the details about error.
https://prnt.sc/ih6k3z
https://prnt.sc/ih6jy6
Please Help me to solve the issue.
I rarely have problem with the master branch and cannot reproduce your problem. However, there could be occasional failures depending on commits. I suggest you to retry again on today's master:
./clone.py master
mvn clean install -DskipTests -Pdistrib
A more stable way to build Nuxeo source code is to use a tag (for release or fast-track), e.g. release-9.10, instead of using master:
./clone.py release-9.10
mvn clean install -DskipTests -Pdistrib
If you're not familiar with the script clone.py, you can show the help message. It keeps a consistent clone for Nuxeo, its add-ons, and packages:
$ ./clone.py --help
Usage: clone.py [options] [version|branch|tag]
Synopsis: ./clone.py master -a -m ""
Clone or update the Nuxeo Platform source code to the master branch, including all addons and Nuxeo Packages
Clone or update Nuxeo Platform source code.
Options:
-h, --help show this help message and exit
-r REMOTE_ALIAS the Git alias of remote URL (default: origin)
-a, --all include 'optional' addons (default: False)
-f FALLBACK_BRANCH, --fallback=FALLBACK_BRANCH
a branch to fallback on when the wanted branch doesn't exist locally neither remotely (default: none)
-n, --nodrivemapping deactivate current directory mapping to a virtual drive on Windows
-m MARKETPLACE_CONF, --marketplace-conf=MARKETPLACE_CONF
the Marketplace configuration URL (default: None)
If set to '' (empty string), it defaults to 'https://raw.github.com/nuxeo/integration-scripts/master/marketplace.ini'
--mp-only clone only package repositories (default: False)

What's the difference between cookbook-gitlab and omnibus-gitlab?

So, I'm trying to install gitlab on a subdirectory. A lot of articles online suggest it is now possible to do so.
I installed omnibus-gitlab but it didn't seem to contain the files required to make gitlab run in a subdirectory like application.rb and stuff. Did a little research and discovered it is not yet supported on omnibus.
So why the differences? I actually thought they were all different ways of getting the same thing. My question again: difference between cookbook, omnibus and normal manual installation. Thanks!
Cookbook : the installation is done by Chef recipes
Manual : you install all the components one by one, manually, with a lot of pain and suffering
Omnibus : The installation in simplified with a .RPM (red hat) or a .deb (Debian), much more simple.
The results are differents: with a manual install, the home dir of gitlab will be somehting like /home/git/... while it will be /opt/gitlab/... in omnibus. Also, the commands to manage your GitLab instance are a little differents. By example, in manual install to seed an external DB you have to type sudo -u git -H bundle exec rake gitlab:setup while gitlab omnibus will need a sudo gitlab-rake gitlab:setup.
From what I tested, they all leed to the same GitLab features, but with a different way to manage it.
Now for the subdirectory (it doesn't works for me, but that's what the documentation say) : after an omnibus install, modifiy the non_root_url in the following files :
/opt/gitlab/embedded/service/gitlab-rails/conf/gitlab.yml
/opt/gitlab/embedded/service/gitlab-rails/conf/application.rb (read the comments at the bottom of the file)
/opt/gitlab/embedded/service/gitlab-rails/conf/unicorn.rb
/opt/gitlab/embedded/service/gitlab-shell/config.yml
And then restart GitLab. I repeat: that's what the gitlab's doc say, but it doesn't works for me. In my case it just create a redirection. Look:
#gitlab is configured to run in subdirectory "/gitlab" :
curl -v http:127.0.0.1:3000/gitlab
----> Error 404
curl -v http://127.0.0.1:3000
----> <html><body>You are being redirected.</body></html>

Gitlab import: Could not locate Gemfile

I have a test VM with Debian Wheezy and no ruby installed. Gitlab 6.9.2 has been installed using the provided installer which brings an embedded ruby. Now, I want to import some old repos into Gitlab, but I cannot find the correct procedure. I think it should be this way:
su - git
export PATH=$PATH:/opt/gitlab/embedded/bin
cd ~
bundle exec rake gitlab:import:repos RAILS_ENV=production
Though, I only get the error "Could not locate Gemfile". I have tried several other ways, also installing Debians ruby, searched multiple Google and StackOverflow results, but I couldn´t get it to work.
You should first place the bare repos in the repo dir. The default path for omnibus is /var/opt/gitlab/git-data/repositories/<namespace>. Then you just run the rake task:
sudo -u git -H cp -r my-project/.git /var/opt/gitlab/git-data/repositories/<namespace>/my-project.git
sudo gitlab-rake gitlab:import:repos
See invoking rake tasks and the import mechanism.
Edit: Sent an MR upstream to include this info in the readme.
I have run into same issue with "Could not locate Gemfile". So I searched for Gemfile and tried several folders. Until it worked.
The solution is related to Gitlab from source (or in my case it run inside offical docker container).
Place your .git bare repository (or several of them) in
"/var/opt/gitlab/git-data/repositories//my-project.git"
switch to user "git".
su git
Try if you have correct PATH by just "rake". If not available, extend your PATH:
export PATH=$PATH:/opt/gitlab/embedded/bin
after that switch to the shell were the rake command to import your bare projects will work and do the import.
cd /opt/gitlab/embedded/service/gitlab-rails/
bundle exec rake gitlab:import:repos RAILS_ENV=production
Output will be similar to this:
Processing raspberry/apollo-web.git
* Created apollo-web (raspberry/apollo-web.git)
Processing raspberry/apollo-web.wiki.git
* Skipping wiki repo
Processing dhbw/dhbw-prototyping-node-rest-course.git
...
EDIT:
Ok I was happy a bit too early. Although the ouput says it was imported. On the Web GUI no new projects.
I will investiage further...

gitlab 6.6.5 community centos rpm - can't figure out how to launch rails console

Environment:
OS: Centos 6.5
GitLab: gitlab-6.6.5_omnibus-1.el6.x86_64.rpm (installed as root user)
Hello all,
I am attempting to figure out how to launch rails console for the gitlab application so I can take a look a the data as needed.
Based on what I read in the documentation it should be stored in /home/git/gitlab but when I change to my git user there isn't a gitlab directory. I did see that there is something familiar in /opt/gitlab/embedded/service/gitlab-rails but since I am logged in as root I don't seem to have anything in my path to execute.
Should I not have installed this as root since all of the documentation for installation is using sudo? If I do have to use something other than root for the install, is simply uninstalling the RPM good enough or do I need to re-install the entire OS?
If my system is ok being installed as root, can anyone tell me where I can find the documentation related to administering gitlab or at the very least the documentation on how to view the data? The documentation that I have found is as of version 5 and it doesn't look like it applies to 6. Again I could be wrong if I installed this incorrectly.
Thanks in advance.
I'm a little disappointed that there doesn't appear to be any documentation for how to install gitlab from RPM, however, I think I've managed to figure it out.
Download and install the .rpm for Centos from https://www.gitlab.com/downloads/
Run: /opt/gitlab/bin/gitlab-ctl reconfigure
Browse to http://example.com:80 and log in with the following creds:
username: admin#local.host
password: 5iveL!fe
I would be cautious of using the above steps for deploying a production site (especially one exposed to the internet) because many of the services seem to be running as root. I'll be doing a bit more reading to see if I can restrict this further.
Also, configuration looks like it's located under: /var/opt/gitlab/gitlab-rails/etc.
Good luck!
Bowen
Reviving an old question, but the answer is:
sudo gitlab-rake rails console

Resources