运行镜像:
[root@sannian min]# docker run -d --restart=always --name gitlab -p 9999:80 -p 4422:22 --hostname 47.99.145.156 twang2218/gitlab-ce-zh
[root@sannian .ssh]# ssh-keygen -t rsa -C "admin@example.com"
[root@sannian .ssh]# vim /root/.gitconfig
[root@sannian .ssh]# vim id_rsa.pub
创建并添加密钥
[root@sannian .ssh]# git clone git@47.99.145.156:4422:root/eatjoys-front-min.git
Cloning into 'eatjoys-front-min'...
git@47.99.145.156's password:
Permission denied, please try again.
git@47.99.145.156's password:
结果还是要密码 还密码不对,,,整了三天,问了半天说是22端口问题
##################################################
然后重新来来,把以前的镜像删除:
[root@sannian .ssh]# docker rm -f e9c5ee1d394a
改变运行镜像命令