背景: 假如你創建項目地址為 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