背景: 假如你创建项目地址为 http://git.ops.test.com.cn/root/puppet.git
。
解决: 如果你已经执行过 git clone http://git.ops.test.com.cn/root/puppet.git
,则可以进入puppet目录,修改 .git/config 中 url = http://账号:密码@git.ops.test.com.cn/root/puppet.git
,再提交就发现不要输入密码了;
或者直接在克隆仓库的时候直接 git clone http://账号:密码@git.ops.test.com.cn/root/puppet.git
,这样下次提交时也不需要输入密码。
原文地址: http://peiqiang.net/2016/07/06/how-to-use-gitlab-http-push-your-code-without-enter-password.html