1.ssh方式 ssh-keygen 然后公钥复制到gitlab,ssh相对简单
2.http方式,两种方法
2.1:
cat ~/.gitconfig
[user]
name = wubo
email = wubo@superred.com.cn
[push]
default = simple
git config --global credential.helper store
cat ~/.gitconfig
[user]
name = wubo
email = wubo@superred.com.cn
[push]
default = simple
[credential]
helper = store
[root@localhost work]# cat ~/.git-credentials
http://root:root%401qaz2WSX.com@10.10.3.160%3a9312
2.2
root@koji:/var/lib/dist-git/git/rpms # cat ~/.netrc 127 ↵
machine 10.10.3.160 login root password root@1qaz2WSX.com
1173

被折叠的 条评论
为什么被折叠?



