今天准备通过在线地址docker build Gitlab的时候发现出错
[[email protected]_Node-172_30_200_213 ~]# docker build -t benyoo/gitlab:15.3.1 https://github.com/sameersbn/docker-gitlab.git unable to prepare context: unable to 'git clone' to temporary context directory: error initializing submodules: usage: git submodule [--quiet] add [-b <branch>] [-f|--force] [--name <name>] [--reference <repository>] [--] <repository> [<path>] or: git submodule [--quiet] status [--cached] [--recursive] [--] [<path>...] or: git submodule [--quiet] init [--] [<path>...] or: git submodule [--quiet] deinit [-f|--force] [--] <path>... or: git submodule [--quiet] update [--init] [--remote] [-N|--no-fetch] [-f|--force] [--rebase] [--reference <repository>] [--merge] [--recursive] [--] [<path>...] or: git submodule [--quiet] summary [--cached|--files] [--summary-limit <n>] [commit] [--] [<path>...] or: git submodule [--quiet] foreach [--recursive] <command> or: git submodule [--quiet] sync [--recursive] [--] [<path>...] : exit status 1 [[email protected]_Node-172_30_200_213 ~]# git version git version 1.8.3.1 [[email protected]_Node-172_30_200_213 ~]#
解决方法添加第三方源安装高版本git
[[email protected]_Node-172_30_200_213 ~]# yum remove git
[[email protected]_Node-172_30_200_213 ~]# yum install https://packages.endpointdev.com/rhel/7/os/x86_64/endpoint-repo.x86_64.rpm -y [[email protected]_Node-172_30_200_213 ~]# yum install -y git [[email protected]_Node-172_30_200_213 ~]# git version git version 2.37.1 [[email protected]_Node-172_30_200_213 ~]#
您可以选择一种方式赞助本站
支付宝扫一扫赞助
微信钱包扫描赞助
赏