• Categories
    Category
    {{ postCtrl.tags }}
    • {{ category.tag_type }}

      • {{tag.tag_name}}
      • View more
  • Categories
    Category
    {{ postCtrl.tags }}
    • {{ category.tag_type }}

      • {{tag.tag_name}}
      • View more
  • News
  • Tutorials
  • Forums
  • Tags
  • Users
Tutorial News Comments FAQ Related Articles

How to Clone a Project in Gitlab-CE 12.0.3 on CentOS 7.6

{{postValue.id}}

How to clone the Project In Gitlab-CE 12.0.3 via SSH and HTTP On CentOS 7.6

Pre-requisite:

Git
Local Machine IP : 192.168.7.231
Remote Gitlab Server IP : 192.168.7.229

Basic Setup On Local machine :

Install git in order to clone the project

[root@LinuxHelp ~]# yum install git -y
Loaded plugins: fastestmirror, langpacks
Loading mirror speeds from cached hostfile
 * base: mirrors.viethosting.com
 * epel: my.fedora.ipserverone.com
 * extras: mirrors.viethosting.com
 * updates: centos.myfahim.com
Resolving Dependencies
--> Running transaction check
.
.
.
.
Installed:
  git.x86_64 0:1.8.3.1-20.el7                                                                                                                

Dependency Installed:
  perl-Git.noarch 0:1.8.3.1-20.el7                                                                                                           

Complete!

SSH-Key generation process

Generate the ssh key using ssh-keygen using rsa algorithm as follows

[root@LinuxHelp ~]# ssh-keygen -t rsa
Generating public/private rsa key pair.
Enter file in which to save the key (/root/.ssh/id_rsa): 
Enter passphrase (empty for no passphrase):
Enter same passphrase again: 
Your identification has been saved in /root/.ssh/id_rsa.
Your public key has been saved in /root/.ssh/id_rsa.pub.
The key fingerprint is:
SHA256:9OTtuEil8Hhcb7/RuHlf6d9IkBNwTqJMJPMCvntWkfE root@LinuxHelp
The key's randomart image is:
+---[RSA 2048]----+
|    . o.+ o o    |
|   . . * = *     |
|    . . B E o    |
|     . o = . o   |
|    . . S = =    |
|     . * + + o o.|
|    . + * . + +.o|
|     o o . o o.=+|
|        . .   *+*|
+----[SHA256]-----+

Open the ssh public Key file and copy the Key

[root@LinuxHelp ~]# cat /root/.ssh/id_rsa.pub
ssh-rsa AAAAB3NzaC1yc2EAAAADAQABAAABAQDzqjAL7msZVJxtuew2//dVNPBVkZFahNePWtyX9y/p+YepiYAsCPDfKR40Y2XHvBqOF+xaltfKz8h702M4np3QXYyRVvQ2i1ltBVZY+Acvxw+09hAT5X586FxInDbcyiKdTiqg98l6yK2E5KKpvDHi2xVMVBaOhEgvOEPxruvmT9+nhreXsJD3ZSLN73P7vgmj+xJsQ2bCk632wiwOR8WPIWA6+WwO+3qmvvP/cDRf2nyqAVYnuHoDVK3i+viyeBvG1cwMjFve/GA71v8a1eba/bHsLUvXx/zeXUBUz+6KNhaEttxGigDSch3nS0o8Dk97z8CXserqyuYlPQy4RORZ root@LinuxHelp

Open the browser and enter the IP address of the Gitlab server with the appropriate login credentials. Snap (1) Snap (2) Click on Settings as shown below. Snap (3) Select the SSH Keys menu to add the ssh key of your local machine on to the remote server. Snap (4) Add the ssh key and save the changes. Snap (5) Snap (6) Click on projects and Choose the Project that you would want to clone Snap (7) Click on Clone as shown below and copy the SSH URL. Snap (8)

Cloning the project Via SSH URL.

Switch over to the terminal and clone the project using git clone command as follows

[root@LinuxHelp ~]# git clone git@gitlab.example.com:root/ubuntu.git
Cloning into 'ubuntu'...
remote: Enumerating objects: 6, done.
remote: Counting objects: 100% (6/6), done.
remote: Compressing objects: 100% (4/4), done.
remote: Total 6 (delta 0), reused 0 (delta 0)

List the directories to verify project Ubuntu

[root@LinuxHelp ~]# ls -la
total 44
dr-xr-x---.  7 root root  267 Aug  1 11:19 .
dr-xr-xr-x. 18 root root 4096 Aug  1 11:19 ..
-rw-r--r--.  1 root root  129 Dec 28  2013 .tcshrc
drwxr-xr-x.  3 root root   47 Aug  1 11:19 ubuntu
-rw-------.  1 root root  657 Aug  1 10:55 .viminfo

Navigate to etc directory

[root@LinuxHelp ~]# cd /etc

Cloning Project Via HTTP.

Switch over to your browser and copy the HTTP URL Snap (9) Clone the project using HTTP URL by executing the following command as follows

[root@LinuxHelp etc]# git clone http://gitlab.example.com/root/ubuntu.git
Cloning into 'ubuntu'...
Username for 'http://gitlab.example.com': root
Password for 'http://root@gitlab.example.com': 
remote: Enumerating objects: 6, done.
remote: Counting objects: 100% (6/6), done.
remote: Compressing objects: 100% (4/4), done.
remote: Total 6 (delta 0), reused 0 (delta 0)
Unpacking objects: 100% (6/6), done.

List the directories to verify the Ubuntu Directory.

[root@LinuxHelp etc]# ls -la
total 1400
drwxr-xr-x.   3 root root       47 Aug  1 11:20 ubuntu
drwxr-xr-x.   3 root root       54 Aug  1 09:51 udev
drwxr-xr-x.   2 root root       26 Aug  1 07:22 udisks2
drwxr-xr-x.   2 root root       68 Aug  1 07:22 unbound
-rw-r--r--.   1 root root      163 Aug  1 07:20 .updated
drwxr-xr-x.   6 root root      103 Aug  1 07:22 X11
drwxr-xr-x.   6 root root      116 Aug  1 07:23 xdg

Change the directory to Ubuntu to view the repositories.

[root@LinuxHelp etc]# cd ubuntu

List the directory to verify the repository files of Ubuntu project.

[root@LinuxHelp ubuntu]# ls
asdf  README.md

Switch Over to the Browser and verify the repository of the Project Ubuntu. Snap (10) With this, cloning of project via SSH and HTTP From Remote Gitlab Server to Local Machine On CentOS 7.6 comes to end.

Tags:
caden
Author: 

Comments ( 0 )

No comments available

Add a comment
{{postCtrl.cmtErrMsg}}

Frequently asked questions ( 5 )

Q

What is the name of the markdown that Gitlab uses?

A

Gitlab flavored markdown is the markdown that gitlab uses.

Q

What does front matter do in gitlab?

A

Frontmatter In Gitlab is metadata included at the beginning of a markdown document, preceding its content

Q

How to refer a specific user in gitlab?

A

@user_name is used to refer a specific user in gitlab

Q

How to refer to a specific group in gitlab?

A

@group_name is used to refer to a specific group in gitlab

Q

How to refer an inComplete task in gitlab?

A

. [] Incomplete task
. [x] Completed task

Back To Top!
Rank
User
Points

Top Contributers

userNamenaveelansari
135850

Top Contributers

userNameayanbhatti
92510

Top Contributers

userNamehamzaahmed
32150

Top Contributers

1
userNamelinuxhelp
31040

Top Contributers

userNamemuhammadali
24500
Can you help Luk Van De Looverbosch ?
How to create a root ?

Hello,
How to create root@linuxhelp in Linux Mint 20.1 64-bit ?
Thanks in advance for your reply.
Best regards.

Networking
  • Routing
  • trunk
  • Netmask
  • Packet Capture
  • domain
  • HTTP Proxy
Server Setup
  • NFS
  • KVM
  • Memory
  • Sendmail
  • WebDAV
  • LXC
Shell Commands
  • Cloud commander
  • Command line archive tools
  • last command
  • Shell
  • terminal
  • Throttle
Desktop Application
  • Linux app
  • Pithos
  • Retrospect
  • Scribe
  • TortoiseHg
  • 4Images
Monitoring Tool
  • Monit
  • Apache Server Monitoring
  • EtherApe 
  • Arpwatch Tool
  • Auditd
  • Barman
Web Application
  • Nutch
  • Amazon VPC
  • FarmWarDeployer
  • Rukovoditel
  • Mirror site
  • Chef
Contact Us | Terms of Use| Privacy Policy| Disclaimer
© 2025 LinuxHelp.com All rights reserved. Linux™ is the registered trademark of Linus Torvalds. This site is not affiliated with linus torvalds in any way.