GitLab的基础使用-客户端克隆(Clone)代码的两种方式
作者:尹正杰
版权声明:原创作品,谢绝转载!否则将追究法律责任。
一.准备环境
博主推荐阅读: https://www.cnblogs.com/yinzhengjie2020/p/12446201.html
二.基于HTTP协议进行克隆实战案例
1>.安装git命令
[root@dbus01.yinzhengjie.org.cn ~]# yum -y install git Loaded plugins: fastestmirror Loading mirror speeds from cached hostfile * base: ftp.sjtu.edu.cn * extras: ftp.sjtu.edu.cn * updates: ftp.sjtu.edu.cn base | 3.6 kB 00:00:00 extras | 2.9 kB 00:00:00 mysql-connectors-community | 2.5 kB 00:00:00 mysql-tools-community | 2.5 kB 00:00:00 mysql57-community | 2.5 kB 00:00:00 updates | 2.9 kB 00:00:00 (1/2): extras/7/x86_64/primary_db | 164 kB 00:00:00 (2/2): updates/7/x86_64/primary_db | 6.7 MB 00:00:03 Resolving Dependencies --> Running transaction check ---> Package git.x86_64 0:1.8.3.1-21.el7_7 will be installed --> Processing Dependency: perl-Git = 1.8.3.1-21.el7_7 for package: git-1.8.3.1-21.el7_7.x86_64 --> Processing Dependency: rsync for package: git-1.8.3.1-21.el7_7.x86_64 --> Processing Dependency: perl(Term::ReadKey) for package: git-1.8.3.1-21.el7_7.x86_64 --> Processing Dependency: perl(Git) for package: git-1.8.3.1-21.el7_7.x86_64 --> Processing Dependency: perl(Error) for package: git-1.8.3.1-21.el7_7.x86_64 --> Running transaction check ---> Package perl-Error.noarch 1:0.17020-2.el7 will be installed ---> Package perl-Git.noarch 0:1.8.3.1-21.el7_7 will be installed ---> Package perl-TermReadKey.x86_64 0:2.30-20.el7 will be installed ---> Package rsync.x86_64 0:3.1.2-6.el7_6.1 will be installed --> Finished Dependency Resolution Dependencies Resolved ============================================================================================================================================================================================================================================================================== Package Arch Version Repository Size ============================================================================================================================================================================================================================================================================== Installing: git x86_64 1.8.3.1-21.el7_7 updates 4.4 M Installing for dependencies: perl-Error noarch 1:0.17020-2.el7 base 32 k perl-Git noarch 1.8.3.1-21.el7_7 updates 55 k perl-TermReadKey x86_64 2.30-20.el7 base 31 k rsync x86_64 3.1.2-6.el7_6.1 base 404 k Transaction Summary ============================================================================================================================================================================================================================================================================== Install 1 Package (+4 Dependent packages) Total download size: 4.9 M Installed size: 23 M Downloading packages: (1/5): perl-Error-0.17020-2.el7.noarch.rpm | 32 kB 00:00:00 (2/5): rsync-3.1.2-6.el7_6.1.x86_64.rpm | 404 kB 00:00:00 (3/5): perl-TermReadKey-2.30-20.el7.x86_64.rpm | 31 kB 00:00:00 (4/5): perl-Git-1.8.3.1-21.el7_7.noarch.rpm | 55 kB 00:00:00 (5/5): git-1.8.3.1-21.el7_7.x86_64.rpm | 4.4 MB 00:00:01 ------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------ Total 3.1 MB/s | 4.9 MB 00:00:01 Running transaction check Running transaction test Transaction test succeeded Running transaction Installing : 1:perl-Error-0.17020-2.el7.noarch 1/5 Installing : rsync-3.1.2-6.el7_6.1.x86_64 2/5 Installing : perl-TermReadKey-2.30-20.el7.x86_64 3/5 Installing : perl-Git-1.8.3.1-21.el7_7.noarch 4/5 Installing : git-1.8.3.1-21.el7_7.x86_64 5/5 Verifying : git-1.8.3.1-21.el7_7.x86_64 1/5 Verifying : 1:perl-Error-0.17020-2.el7.noarch 2/5 Verifying : perl-TermReadKey-2.30-20.el7.x86_64 3/5 Verifying : perl-Git-1.8.3.1-21.el7_7.noarch 4/5 Verifying : rsync-3.1.2-6.el7_6.1.x86_64 5/5 Installed: git.x86_64 0:1.8.3.1-21.el7_7 Dependency Installed: perl-Error.noarch 1:0.17020-2.el7 perl-Git.noarch 0:1.8.3.1-21.el7_7 perl-TermReadKey.x86_64 0:2.30-20.el7 rsync.x86_64 0:3.1.2-6.el7_6.1 Complete! [root@dbus01.yinzhengjie.org.cn ~]#