1. 程式人生 > >git設定和儲存使用者名稱密碼

git設定和儲存使用者名稱密碼

[[email protected] mar_document]$ git clone http://git.idwzx.com:7990/scm/mar_document/document.git
Cloning into 'document'...
Username for 'http://git.idwzx.com:7990': zhangzhiqiang
Password for 'http://[email protected]:7990': 
remote: 物件計數中: 1080, 完成.
remote: 壓縮物件中: 100% (897/897), 完成.
remote: Total 1080 (delta 417), reused 511 (delta 177)
Receiving objects: 100% (1080/1080), 65.92 MiB | 6.36 MiB/s, done.
Resolving deltas: 100% (417/417), done.
[
[email protected]
mar_document]$ git config user.name "zhangzhiqiang"
error: could not lock config file .git/config: No such file or directory
[[email protected] mar_document]$ cd document/
[[email protected] document]$ git config user.name "zhangzhiqiang"
[[email protected] document]$ git config user.email "
[email protected]
"
[[email protected] document]$ echo "[credential]" >> .git/config
[[email protected] document]$ echo "    helper = store" >> .git/config
[[email protected] document]$ git config --list
core.repositoryformatversion=0
core.filemode=true
core.bare=false
core.logallrefupdates=true
remote.origin.url=http://git.idwzx.com:7990/scm/mar_document/document.git
remote.origin.fetch=+refs/heads/*:refs/remotes/origin/*
branch.master.remote=origin
branch.master.merge=refs/heads/master
user.name=zhangzhiqiang
[email protected]

credential.helper=store